To download NI software, including the products shown below, visit ni.com/downloads.
This example shows how to programmatically create new Step, Variable, and Sequence templates in the sequence editor using the TestStand API.
In order to create new templates, this example completes the following steps:
Locals.templatesFile= RunState.Engine.GetTemplatesFile(0)
Locals.templatesFile.AsPropertyObjectFile.Data.Root["Steps"].SetPropertyObjectByOffset(0,1,RunState.SequenceFile.GetSequenceByName("Template").GetStepByName("Test Step", StepGroup_Main).AsPropertyObject.Clone("", 0))
Locals.templatesFile.AsPropertyObjectFile.IncChangeCount(),
RunState.Thread.PostUIMessageEx(UIMsg_RefreshWindows,0,"",Nothing,True)
Dynamic Template Insertion - TS2012.seq
TestStand 2012 or Compatible
Dynamic Template Insertion - TS2016.seq
TestStand 2016 or Compatible
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.