NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically find file name

Solved!
Go to solution

How can I programmatically find the report plug in being Enabled and its Output Name and then get the file name being currently generated?

I used the attached VI but believe I may not be passing the Engine reference correctly from TestStand to LabVIEW, keep getting error 97.

Thanks!!

 

 

*************************************************
CLD
*************************************************
Download All
0 Kudos
Message 1 of 3
(696 Views)

On further investigation I found a way to get the file path using:

 

RunState.Root.Locals.ModelPluginConfiguration.Plugins[<plugin index>].PluginSpecific.RuntimeVariables.PerSocket[<socket index>].Path

 and even tried:

RunState.Root.Sequence.Locals.ModelPluginConfiguration.Plugins[<plugin index>].PluginSpecific.RunTimeVariables.PerSocket[RunState.TestSockets.MyIndex].Path

 

 but both return the error in argument 1,

Unknown variable or property name 'RunState.Root.Sequence.Locals.ModelPluginConfiguration'.

 

Also how to find in plugin index for a given plugin name programmatically? I do see Base.Enable property but how to first find the name of the plugin?

 

Thanks!!

*************************************************
CLD
*************************************************
0 Kudos
Message 2 of 3
(674 Views)
Solution
Accepted by topic author lvrat

Thanks Davis21, although I am not sure I understand the UriUtils class you mentioned. 

 

After doing some testing the following syntax works for me when calling in Cleanup step of Mainsequence:

Locals.FilePath = RunState.Root.RunState.Sequence.Parameters.ModelPluginConfiguration.Plugins[Locals.LoopIndex].PluginSpecific.RuntimeVariables.PerSocket[RunState.TestSockets.MyIndex].ReportPath

 

Thanks!!

*************************************************
CLD
*************************************************
0 Kudos
Message 3 of 3
(656 Views)