RSView32:Graphic Properties manipulations with VBA

purduman

Member
Join Date
Oct 2007
Location
trapped in a box
Posts
8
I have in the past been able to configure a Text's Caption Property during runtime in RSView SE using VBA, and am trying to do the same with RSView32 (7.0). For some reason I am having problems getting the script correct. If anyone has any suggestions I would appreciate it. Thanks in advanced!
 
Saying, "I can't get a script correct, what are your suggestions" might as well be, "I don't feel good, what should I take"?

Include your script, or at least the relevant lines of code and describe the error condition. Help us help you.

purduman said:
I have in the past been able to configure a Text's Caption Property during runtime in RSView SE using VBA, and am trying to do the same with RSView32 (7.0). For some reason I am having problems getting the script correct. If anyone has any suggestions I would appreciate it. Thanks in advanced!
 
The script I have used in RSView Studio has been:

Dim oDisplay As DisplayClient.Display
Dim oText As DisplayClient.Text

Set oDisplay = Me
Set oText = oDisplay.FindElement("Text") oText.Caption = "My Text to Change to"

Set oText = Nothing
Set oDisplay = Nothing


VBA in RSView Studio is designed per Graphic. I assume that is why the Set oDisplay = Me works. In RSView32 VBA is per project. I need to assign oDisplay to the specific graphic, which I am having problems with.
Hope this makes sense. Thanks again.
 
I assume you have a line break between "Set oText =" and "oText.Caption=".

I suspect the problem may be with the "Set oDisplay = Me" line. I don't doubt that oDisplay is being set to a VBA form. The trick is getting it set to the correct one? Can you step through the code or use the Cntl+Space shortcut as you're typing "oDisplay." to list the properties. It's probably something like oDisplay=Me.FindGraphic("myWindow").

purduman said:
The script I have used in RSView Studio has been:

Dim oDisplay As DisplayClient.Display
Dim oText As DisplayClient.Text

Set oDisplay = Me
Set oText = oDisplay.FindElement("Text") oText.Caption = "My Text to Change to"

Set oText = Nothing
Set oDisplay = Nothing


VBA in RSView Studio is designed per Graphic. I assume that is why the Set oDisplay = Me works. In RSView32 VBA is per project. I need to assign oDisplay to the specific graphic, which I am having problems with.
Hope this makes sense. Thanks again.
 
Last edited:
I suppose I can just use a ActiveX Control (Microsoft Forms 2.0 Label) and assign a tag to the Caption property. I want to avoid doing this, though, to minimize tag usage.
 
Last edited:
You wouldn't happen to know where the RSView SE scripting docs are available online would you? Please see other edit about looking into the object model.
 
It shouldn't be that hard - just need to find a good reference or example code. All we need to do is find out how you reference the graphic in the object model. It should only be 1 level deep.
 
I want to do exactly the same thing in RSView32. I cant seem to locate the Displays in the Object model. How can i get a handle on a display in Runtime in RSview32????
 

Similar Topics

I have seen a strange error happen with rsview32 where all displays are displayed in default status even those that should be hidden at run time...
Replies
0
Views
1,764
Hi, (RSView32 Works v7.50) I have a problem with exporting and importing of graphic files between projects. I export graphics from one project...
Replies
4
Views
4,193
I've been running RSView32 V7.2 for a couple years now and it is fine. Today a couple graphic elements on started showing the outlines of...
Replies
3
Views
1,673
Hello All! I am using RSView32 Build 6.30.16 and I want to us it as an HMI in my Home security and automation sistem. But I can't find graphic...
Replies
3
Views
5,903
is there any viewer to see the imagens inside this files
Replies
3
Views
5,055
Back
Top Bottom