NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

TestStand API.NET Action Property Setting

I want to create an .NET action step with C#, I know we can use code such as below to add an action step:

   mainSequence.stepGroups[(int)StepGroupName.setup].steps.Add(new StepData("Action", StepTypes.StepType_Action , AdapterKeyNames.NETAdapterKeyName));

but to make action step works, we need to set the Assbemly, Root Class, Method Invocated properties,  something like 

   mainSequence.stepGroups[(int)StepGroupName.main].steps.Last().stepProps.Add(new PropData("RootClass", "a.b.c"));

but i don't know the property path for them , cannot see it in property panel either, anymore can help me on this?

0 Kudos
Message 1 of 2
(3,607 Views)

You need to create a new step using the .NET adapter with the Engine.NewStep API. Then add it to your sequence. Then do something like this to get the higher level API for specifying .NET modules:

 

DotNetModule myModule = (DotNetModule) myStep.Module;

 

Then set the assembly on the module using SetAssembly(), then set the ClassName, then specify the calls.

 

Hope this helps,

-Doug

0 Kudos
Message 2 of 2
(3,580 Views)