‎05-30-2009 02:26 AM
Solved! Go to Solution.
‎06-02-2009 09:29 AM
Hi Yash,
Yes it is possible to place text labels on a report from LabVIEW at runtime using the same piece of code I linked to in your other post.
In this instance you need to modify the 2D array with a new set of commands. The commands in VBScript are listed below.
Call GraphObjNew("FreeText","Text4")
Call GraphObjOpen("Text4")
  '------------------- Text -----------------------------
  TxtTxt           = "Test"
  TxtFont          = ""
  TxtSize          = 3
  TxtColor         = "black"
  TxtColorRGB      = 33554432
  TxtBold          = 0
  TxtItal          = 0
  TxtUndl          = 0
  TxtStrOut        = 0
  TxtFrame         = 0
  TxtBackColor     = ""
  TxtBackRGB       = 50331647
  TxtBackRGB2      = 15263976
  TxtBackFMode     = "Vertical"
  TxtBackFVariant  = "From bottom"
  '------------------- Position -----------------------
  TxtPosX          = 36.47
  TxtPosY          = 15.83
  TxtAng           = 0
  TxtRelPos        = "r-bot."
Call GraphObjClose("Text4") 
You will need to convert these for the VI.
The conversion you need to follow is as such: Where ever you have Call you replace that with Cmd
so Call GraphObjNew("FreeText","Text4") becomes Cmd GraphObjNew("FreeText","Text4")
and TxtTxt = "Test" becomes Var TxtTxt "Test"
ignore any lines starting with '
so the first few lines of the script become as such in the array control.
Cmd GraphObjNew("FreeText","Text4")
Cmd GraphObjOpen("Text4")
Var TxtTxt Test
Var TxtSize 3
and so on.
You can also ignore lines with = "" as we need to remove the "" when we are sending Variables.
Regards
JamesC
NIUK and Ireland
It only takes a second to rate an answer 🙂