NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

how to get the value field of the return parameters for an action step in teststand sequence file programatically using c#


                Sequence mySequence = myEngine.NewSequence();
                mySequence.Name = "myAction";
                //Create new step of type Action and set Name
                Step mystep = myEngine.NewStep(AdapterKeyNames.DotNetAdapterKeyname, StepTypes.StepType_Action);
                mystep.Name = "GetStringObject";

                //Obtain the code module from the step
                DotNetModule myModule = mystep.Module as DotNetModule;
                //Set properties of the module

                myModule.SetAssembly(DotNetModuleAssemblyLocations.DotNetModule_AssemblyLocation_File, @"C:\Documents and Settings\My Documents\Visual Studio 2005\Projects\HelperClass\HelperClass\bin\Debug\HelperClass.dll");
               
                myModule.ClassName = "Class1";
               
                myModule.MemberType = DotNetModuleMemberTypes.DotNetMember_GetProperty;
                myModule.MemberName = "StringObject";


              
              
                mySequence.InsertStep(mystep, 0, StepGroups.StepGroup_Setup);


                mySequence.Locals.NewSubProperty("StringObject", PropertyValueTypes.PropValType_Reference, false, "", 0);

                DotNetParameterDirections reference = mySequence.Locals as DotNetParameterDirections;
                mySequence.Locals.GetPropertyObject("StringObject", 0);
                myModule.ClassReference = "Locals.StringObject";



                myModule.LoadPrototypeFromMetadataToken(385875969, 0);

 

After this I am not able to proceed.herewith attached documents contain screenshot of teststand file marked red is to be solved. How to define the value field of the return parameters?

Download All
0 Kudos
Message 1 of 2
(3,420 Views)

Please see my answer to your question on page two of the following forum thread:

 

Programmatically generating DotNet Steps in TestStand

Manooch H.
National Instruments
0 Kudos
Message 2 of 2
(3,371 Views)