DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Text object relative position problem

Solved!
Go to solution

Hi,

 

I have a problem specifying object's relative position using scripts in DIAdem.

I am trying to use the RelPosLst variable to set text relative position to "right". However, when I run the script, I always get "center" as text's relative position. The code example follows:

 

 Call GraphObjNew("FreeText","Text3")

Call GraphObjOpen("Text3")

TxtPosX = 14.7

TxtPosY = 57

TxtBold = True

 TxtTxt = "Site: " & Site

TxtFont = "Arial"

TxtSize = 4

RelPosLst = "Right"

Call GraphObjClose("Text3")

 

Am I doing something wrong?

 

Thank you

 

Egor

Message 1 of 3
(4,207 Views)
Solution
Accepted by topic author Ermak

Hi Egor,

 

the variable RelPosLst is only the list variable of the positions, you have to use the variable TxtRelPos in your code.

 

Tip: if you want to get all variables of a dialog, open it and press "Strg + a". With this you copy all (scriptable) variables of the dialog to the clipboard and you can paste it in your VBScript. This is much easier than searching the help file. 

 

In code :

Call GraphObjNew("FreeText","Text3")
Call GraphObjOpen("Text3")
TxtPosX = 14.7
TxtPosY = 57
TxtBold = True
TxtTxt = "Site: " & Site
TxtFont = "Arial"
TxtSize = 4
TxtRelPos = "right"
Call GraphObjClose("Text3")
Call PicUpdate

 

Regards Sven

Message 2 of 3
(4,202 Views)
Message Edited by Ermak on 06-17-2009 01:59 PM
0 Kudos
Message 3 of 3
(4,199 Views)