NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a function to send window id's to TS to use for placement of the standard panels/windows that are created during normal TS operation?

I have asked this question previously in a different manner and have not received any useful hints. I want to manage the placement of all of the standard TS windows/panels during normal operation of TS.
 
Thanks in advance,
 
Paul
0 Kudos
Message 1 of 8
(3,635 Views)
Paul,

Are you attempting to control the TestStand windows such as the "Enter Serial Number for UUT", "Test Failed", and "Test Passed"?  The windows that you see from a TestStand sequence are implemented in a CVI project called "modelsupport2.prj".  You can find this project and the support files for it in the <TestStand>\Components\NI\Models\TestStandModels\ directory.  You are free to modify this project to allow you to control the placement of the windows.  Since this is a CVI Project, you must have CVI in order to modify the project because the panels are created with the CVI User Interface panels.

If you do have CVI, you can add function calls to set the placement of the windows.  If you look in the support code, you will see SetPanelAttribute(...) calls.  These are the calls that set the placement of the panels.  Specifically, SetPanelAttribute(panel, ATTR_TOP) and SetPanelAttribute(pannel, ATTR_LEFT).  If you have any questions about these calls, please let us know.

Thanks,

Tyler Tigue
NI
0 Kudos
Message 2 of 8
(3,619 Views)
For example a window/panel I want to control is the standard io window. I wish to place it in a tabbed panel so I need to set the window id for it. Maybe it is possible to map the hosts std io to a tabbed panel and then tell teststand to use the host std io instead of the  CVI std io?
 
Paul
0 Kudos
Message 3 of 8
(3,615 Views)
Paul,

I am a bit confused about which windows you are talking about.  It is possible to run TestStand from a Sequence Editor or from an Operator Interface.  The Sequence Editor is used to edit and create sequences.  There are several different views (windows) available in the Sequence Editor.  There is a Sequence View, Execution View, and Report View.  The Operator Interface is a programmed application that acts a front end to the TestStand engine.  It has similar views as the Sequence Editor, except that it is built out of ActiveX controls.  You can see OI applications at work in the <TestStand>\OperatorInterfaces directory.  When you say standard IO, I normally think of console output.  Do you mean the Execution View from TestStand?  Are you using the Sequence Editor or an Operator Interface?  If you are using the Sequence Editor, it may be difficult to get a window handle because it is its own executable.  The Operator Interface, is a editable program, and adjusting and customizing the layout is much easier from the OI.

Please let me know.

Thanks,

Tyler Tigue
NI
0 Kudos
Message 4 of 8
(3,594 Views)

Tyler,

When you open a sequence file using the Operator Interface, a Standard IO window also opens. This (the standard io) is one of the windows I want to place in a tabbed window.

Paul

0 Kudos
Message 5 of 8
(3,591 Views)
Paul,

I am assuming that you are talking about the File Dialog when you select "Open Sequence File..." from the menu.  The code for the dialog is encapsulated as a command in the Operator Interface.  If you look in the TestStand help, under Command Kinds, you can see all the coded commands that will cause the OI to respond.  The CommandKind_OpenSequenceFile command is what causes the File Dialog to popup.  When the user selects the proper file and chooses to Open the dialog, the OpenSequenceFile command triggers a DisplaySequenceFile event.  This event is handled by the Application Manager with a callback function (or VI if you are using LabVIEW).  The SequenceFile gets updated in the SequenceFileView manager.  Unfortunately, much of this code is handled internally by the Operator Interface manager controls.  The File Dialog is simply a function that gets called, and the Window handle is never really accessed by the OI developer.

You may have a few options, however.  There may be a Windows kernel function, that accesses child Window handles.  I would search MSDN for any functions that will help access Window handles.

The other option is to implement the File Open dialog yourself.  I believe, the File Chooser is a standard dialog popup, that you can call from most programming languages that are accessing Windows functionality.  However, you should trigger the DisplaySequenceFile event after the user selects a file.  This will cause the SequenceFileView manager to be udpated with the proper sequence file.

I have not tried either of these implementations.

If you have any questions, please let me know.

Thanks,

Tyler T.
NI
0 Kudos
Message 6 of 8
(3,560 Views)

Hmm. I'm not sure he is referring to that. I thought he might be referring to the CVI stdio window that is probably appearing because some of his CVI code modules write to stdout.

This window is created by the CVI runtime libraries. A TestStand operator interface, or any other application, has no idea that the window exists.

It is conceivable that you might use Windows SDK level functions to find the window handle to the CVI stdio widow and then reparent it inside a TestStand OI application. However, this is a mega-kludge that would surely generate an endless supply of new problems.

A better solution would be replace the calls in the code modules that output to stdio with wrapper functions you create to enable you to redirect the output wherever you like.  You could then insert the output into the TestStand report, or send it to your OI via a custom UI message. Your modified OI could then display the text wherever it preferred, including within a new tab.

Message 7 of 8
(3,546 Views)

Maybe beardsdad could post an artist impression to give some idea what is after!

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 8 of 8
(3,530 Views)