NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Sequence Call step and passing arguments with API

Solved!
Go to solution

Hello,

I think I understood the API so far. It was a fight from my perspective but ok.

Now I found a new issue.
If I insert using the API a sequence call for a sub sequence it works so far.
The issue is similar to python adapter calls the variables which need to be passed down the way to the call will not be generated.
For python I found a dirty workaround for sequence call, it seems to not that easy.
I need to generate a container and not an array element.
And as far as I understood a SequenceArgument.
But I didn't found a SetValContainer....

0 Kudos
Message 1 of 3
(290 Views)
Solution
Accepted by maxhuebn

Container is a bit different story. Try Locals.NewSubProperty("NewContainer", PropValType_Container, False, "", PropOption_NoOptions) or Locals.SetPropertyObject("NewContainer", PropOption_InsertIfMissing, RunState.Engine.NewPropertyObject(PropValType_Container, False, "", PropOption_NoOptions))

 

Also read this: https://www.ni.com/docs/en-US/bundle/teststand/page/properties.html. Perhaps it will make things more clear with Containers/Properties.

 

And here is PropertyObject API: https://www.ni.com/docs/en-US/bundle/teststand-api-reference/page/teststand-api-ref/propertyobject.h...

Michał Bieńkowski
CLA, CTA, CPI

  1. Did someone devote their time to help solve your problem? Appreciate it and give kudos.
  2. Problem solved? Accept as a solution so that others can find it faster in the future.
  3. Contribute to the development of TestStand by voting on the TestStand Idea Exchange.
Message 2 of 3
(271 Views)

Your approach was really good but wasn't the complete solution for me at least as it is a special type of container.

 

newStep.AsPropertyObject().NewSubProperty("NewContainer",0x4,False,"SequenceArgument",0x1,)

Afterwards it ran like a charm.

0 Kudos
Message 3 of 3
(220 Views)