What I'm after is a way of inserting a custom step that is based on a sequence adapter with module information embedded in it automatically.
Any ideas whether this is doable (my intuition says that if TS native UI can do it then there must be a way) and if so, how?
Solved! Go to Solution.
When you call the NewStep method, you must let the adapterKeyNameVal empty. So this method use the default adapter of the step type (as you want).
If you enter the string 'Sequence Adapter', the newStep method use the adapter of sequence call, which have no file pathname, no parameter ...
If you're curious about what's different than the context menu and your button, the context menu is probably using CommandKind_Edit_InsertSteps_Set.
If you replace your button with one of the TestStand ActiveX buttons, you should be able to connect it like with the other SequenceFileViewMgr controls and get the same behavior:
Since you're doing this level of customization, you may find this example useful:
This is handy if you want to limit what kind of control your end users have. If you're more interested in scripting sequence file generation instead of OI customization, there is a shipping example for that in the %TestStandPublic% directory.
Hope this helps!
Thanks Laurent, really didn't expect the solution to be so simple!
Also appreciate the additional info Trent, it definitely will come-in handy.