DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling dialog boxes in a DIAdem script from LabVIEW

I have a DIAdem script that prompts the user for the data file it will process. The datafile was created from a labview test routine.   I can now run the script from LabVIEW using the "DIAdem Run Script.VI", but in the interest of automation, I would like to have LabVIEW place the filename in this dialog.  I would like to keep the dialog in the script, since sometimes we run this script manually. (without LabVIEW)
 
Bill W.
 
 
0 Kudos
Message 1 of 4
(3,773 Views)
Bill,

Which dialog are you using to prompt for the file name?  It appears that you cannot send any information to the script through the Run Script.vi.  However, you can call automation commands using the "DIAdem Run Automation Command.vi".  If you want to pass data to the script, then you can set a Global Variable, or a DIAdem Script Variable.  As an example, you could use the global variable, T1, and send "T1 := 'myfile'".  When the script is executed, that variable will be accessible within the script and it will be set to "myfile".  You could also set the FileDlgName variable to your file name.  Then it may be possible to send those variables to your dialog so that they are automatically populated.

Good Luck!

Tyler Tigue
NI
0 Kudos
Message 2 of 4
(3,755 Views)

Hi Bill,

I recommend you set a DIAdem variable with the built-in LabVIEW VI, say "T5" or "T9" or "FileDlgName" or some global DIAdem variable like that.  Then if your SUDialog automatically pre-populates that filepath field with the value stored in that global DIAdem variable, you will get the same correct pre-population whether you run the SUDialog from DIAdem or remotely from LabVIEW.

Regards,
Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 3 of 4
(3,754 Views)

Thanks Tyler and Brad!  I'll give those solutions a try.

Bill

0 Kudos
Message 4 of 4
(3,751 Views)