06-06-2013 08:03 AM
Hello everybody,
I am coding the ProcessModelPreStep in order to have access to each step of the running sequence, before it has been execute. With the following expression I access to the type name of the step:
Locals.Type_Name = RunState.Caller.Step.StepType
But I can't find the expression to get access to all the parameter names of the step type.
Does somebody know such an expression to do that ?
Thanks you !
06-06-2013 08:29 AM
A step itself has no parameter.
A code module has parameters.
Or do you refer to the parameters the sequence has which is holding the step?
06-06-2013 08:52 AM - edited 06-06-2013 09:05 AM
I don't know much about TestStand, but you are probably right I do refer to the parameters of the code module, I need to get their names.
06-06-2013 09:38 AM
Ok, the parameters are connected to the code modules, hence to the module adapter.
The data involved for the adapter is stored in a hidden container called "TS" within the step. In order to see this container, you have to check the "Show hidden properties" option in the preferences of your Station Options. The TS container includes a variable called "SData".
Depending on the adapter, within the SData container, you can find your parameters.
hope this helps,
Norbert
06-07-2013 09:27 AM
Ok, thank you.
I'll try to explore this way but the amount of properties / methods is so huge !
06-07-2013 09:49 AM
There is also a higher level API for module settings, a separate interface for each adapter. Using the API is more future proof, the properties under SData might change in a future version.
-Doug
06-07-2013 11:25 AM
As Doug mentioned, we recommend using the adapter API to access module information such as parameters (this is an additional API we provide in addition to the standard TestStand engine API). The adapter API can be used in expressions along with the engine API. For example, to get a LabVIEW parameter you would use the following:
RunState.Caller.Step.Module.AsLabVIEWModule.Parameters.Item(0)
06-11-2013 06:54 AM - edited 06-11-2013 06:57 AM
Ok, thank you everyone, I've found a way to do what I wanted, with the following expression :
Locals.Item_Names[Locals.LoopVar] = RunState.Caller.Step.AsPropertyObject.GetNthSubProperty("",Locals.LoopVar,0).Name
Thank you again !
(I'm LDT, I've changed my account)