NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Native Teststand application operated over API calls

Hi All, 

 

is it possible to open TestStand  application and operate all its features through API calls (C#)?

There is some example which uses Microsoft Winfows Forms as a simple User Interface. But I want to programmatically open the native Teststand  aplication so it is visible on screen and operate it via calls to API interop.

Is this possible? If yes, how to do it in C#?

 

Thanks

 

Michael

0 Kudos
Message 1 of 4
(656 Views)

Do you mean to open SeqEdit.exe and use it with an API? Or to open TS Engine and control it with an API?

 

SeqEdit can return Application Manager (through Engine Internal Options) and you can use it to interact with some of the UI controls. Unfortunately, not every connection is accessable this way (e.g. you will not be able to access VariablesView). Other components such as Output pane can't be access at all (AFAIK). So, to have full control over it you would need to look at tools used for UI automation (typical SW testing stuff).

 

The task would be much easier with custom operator interfaces because they are made completely with an ActiveX UI controls and accessing them through manager controls is quite obvious (however, you will need to think about proper reference exposing for your C# app - perhaps using TS synchronisation objects?).

 

Controlling TS Engine from C# would be the easiest solution, but in this case we are talking about usage of "backend", not programmatic interactions with UI in separate process.

Michał Bieńkowski
CLA, CTA

Someone devote his time to help solve your problem? Appreciate it and give kudos. Problem solved? Accept as a solution so that others can find it faster in the future.
Make a contribution to the development of TestStand - vote on TestStand Idea Exchange.
0 Kudos
Message 2 of 4
(625 Views)

Hi Michal,

 

Thanks for valuable feedback!

The ideal setup would be open SeqEdit.exe and use it with API. The aim is only opening and starting sequence. No complex operations over API.

But the advantage of having the SeqEdit.exe visible with all its features to be used manually for eventual debugging is what I want. 

 

You mentioned: "SeqEdit can return Application Manager (through Engine Internal Options)" 

 What would be the correct process of achieving this in C#?  How do I open the SeqEdit.exe application so it can reflect its ApplicationManager object? Is there a function in the API for this?

 

Thanks

Michael

 

 

0 Kudos
Message 3 of 4
(613 Views)

Before diving in API could you consider using SeqEdit CLI? You can start SeqEdit and instruct it through CLI to start particular sequence.

 

If you insist to use API then I think you would need to use CLI anyway to run some setup sequence which will access particular app manager and pass it to another process (C# app).

 

Check Engine.GetInternalOptions method.

 

Anyway, what you are trying to accomplish isn't easy and I'm not 100% sure that my hints will work. I should try this by myself first 😄

Michał Bieńkowski
CLA, CTA

Someone devote his time to help solve your problem? Appreciate it and give kudos. Problem solved? Accept as a solution so that others can find it faster in the future.
Make a contribution to the development of TestStand - vote on TestStand Idea Exchange.
0 Kudos
Message 4 of 4
(595 Views)