NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Edit SequenceCall Settings in C++

Hello,

I've a Step-Type derived from SequenceCall. I'd like to programmatically insert
the step in a sequence. But I cannot access the step's properties like the
path of the sequence the step is supposed to call. I can create the step and
set it's name but that's it. The code (Visual C++) looks something like this:

    step = engine->NewStep("Sequence Adapter", "myStepType");
    step->Name = (_bstr_t)mStepName;
   
    // here I would like to set the path to the sequence to call

    sequence->InsertStep(step, StepCounterSequenceMain, (TS::StepGroups)1);

Does anyone have an idea how that's accomplished? I'm currently using TS 3.5.
Thank you!

Mike




0 Kudos
Message 1 of 5
(3,491 Views)
Hi Mike,
 
This is C# code snipped which inserts the Ni-Step SequenceCall to the MainSequence
 

Step

stepSeqCall = engine.NewStep(AdapterKeyNames.SequenceAdapterKeyName, "SequenceCall");

stepSeqCall.Name = sequence.Name;

SequenceCallModule objModule = (SequenceCallModule)stepSeqCall.Module;

objModule.UseCurrentFile =

true;

objModule.SequenceName = sequence.Name;

seqMain.InsertStep(stepSeqCall, nSeq,

StepGroups.StepGroup_Main);

Hope this helps
 
Juergen
--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 2 of 5
(3,470 Views)
Hi Juergen,
 
thank you for your response. I've seen your other post in which
you explain how to access the step properties. Unfortunately
the type SequenceCallModule is not known. It is unknown.
You don't happen to know whether there are implementation 
differences between C# and C++?
 
Greetings from Stuttgart
Michael
0 Kudos
Message 3 of 5
(3,466 Views)
It's in the TSAdp namespace.

Try TSAdp::SequenceCallModule.

Allen P.
NI
0 Kudos
Message 4 of 5
(3,457 Views)

And don't forget to import TsAdpApi.tlb

For TS4 it looks like

#import

"C:\\Programme\\National Instruments\\TestStand 4.0\\Bin\\TsAdpApi.tlb" no_implementation rename_namespace("TSAdp")

Grüße von sonnigen Bodensee

Juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 5 of 5
(3,448 Views)