06-17-2009 10:40 AM
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: " & SiteTxtFont = "Arial"
TxtSize = 4
RelPosLst = "Right"
Call GraphObjClose("Text3")
Am I doing something wrong?
Thank you
Egor
Solved! Go to Solution.
06-17-2009 01:46 PM
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
06-17-2009 01:56 PM - edited 06-17-2009 01:59 PM