NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

TestStand - Dynamically retrieve a code module prototype

Solved!
Go to solution

Hi all,

 

Thanks for reading me Smiley Tongue

 

I'm currently trying to find some code (if it does exist), or some ideas/directions in order to automatically retrieve a code module prototype.

Such a code can be written in any language (LabVIEW, C, TestStand or any other)

 

My final goal is to scan a directory for VIs, DLLs (and so on) and get their prototype in order to have an external generator code module database filled.

 

In case this code doesn't exist, could you please let me know what methods I could interact with in the TS engine to retrieve a code module.

 

Best regards.

0 Kudos
Message 1 of 6
(4,133 Views)

Hi Mathieu,

 

At the of this "funny" thread there will be an example who it could work with .net adapter

http://forums.ni.com/t5/NI-TestStand/how-to-crate-an-action-step-in-teststan-using-C-along-with/td-p...

 

On this Thread there is an example with Labview Adpater

http://forums.ni.com/t5/NI-TestStand/Create-a-LabVIEW-Step-dynamically/m-p/977348#M25792

 

On this here with SequenceCall Adapter

http://forums.ni.com/t5/NI-TestStand/Insert-SubSequence-Call-Step-using-TS-API/m-p/628857#M17591

 

Regards

Juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
Message 2 of 6
(4,117 Views)

Thanks Juergen

 

I'm not try to script TS code (which I can do), but to retrieve code module parameters.

It means that for a given sequence, I want to get the parameters of the code module of one of its steps.

 

Hope this is more clear now. Lmk if it's not

 

Regards.

0 Kudos
Message 3 of 6
(4,115 Views)

Hi,

 

Have you ever looked inside the stuff ?

In all examples the prototype of the module is loaded.

and then it is processed.

 

you need to process it in a other way thats clear, but you have to load.

 

Regards

Juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
Message 4 of 6
(4,110 Views)
Solution
Accepted by topic author Former NI Employee MS

Hi ,

 

On this C# example you will see what has to be done to get the parameters list

SequenceCallModule objModule = (SequenceCallModule)step.Module;  // Just a note: only if you are sure that is a SeqenceCall   
objModule.UseCurrentFile =
true;
objModule.SequenceName = strSeqName;
objModule.UseSequenceParameterPrototype =
false;
objModule.LoadParametersFromSequence(sequence);
SequenceCallParameters Parameters = objModule.Parameters;

 

Regards

Juergen

 

 

 

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
Message 5 of 6
(4,107 Views)

Juergen,

 

Sorry for delay.

I must say you are right. I read the links very fast, without getting into code. I thought it was dealing with something else.

 

Thanks a lot for having pointed these thread out

 

Best regards.

0 Kudos
Message 6 of 6
(4,007 Views)