DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

How to send text labels to Diadem from LabVIEW?

Solved!
Go to solution
Is it possible to place text labels in a Diadem report from LabVIEW at runtime? Lets say by specifying its coordinates, text lable name and value? Thanks..
0 Kudos
Message 1 of 2
(3,703 Views)
Solution
Accepted by topic author Yashasvi

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 🙂

Message 2 of 2
(3,675 Views)