NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Top Level VI size issues

I tried a reply on a different thread and was not getting any response, so I thought I'd try a different thread with a little more info.  Anyway, I have a custom HMI based off the TS4.0 operator interface.  I originally grew it (and modified it) to fit a 22" HD monitor with the rectangular aspect ratio.   Now I'm trying to shrink it back down so it fits in a normal 19" monitor.  I have some parts working, but for some reason, the outer boarder of the top-level VI is like 1574 (similar to the 22" size).  In the Top-Level VI I have set the VI properties (Window Runtime Position) to Panel Size->Width=1280 and Height->900.  The height (I think) is being observed at runtime, but the width looks correct (1280) briefly, then pops out to 1574 (roughly).  I've even tried to force the Panel Bounds of the TopLevelVI to 1280 in ArrangeControls (attached), but it has no effect.  I have no idea why it won't conform to the desired width.  All the controls inside the outer boarder seem to be ok, it's just the outer border.  Thoughts?
Download All
0 Kudos
Message 1 of 11
(3,980 Views)

Hi mrbean,

 

Are you still using the VI's TestStand - Load Bounds and Teststand - Save Bounds, as these load and save the bounds in the config file  under Layout.Bounds.

 

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 11
(3,976 Views)
Yes - I think.  TopLevelVI calls Full UI - Initialize which calls Full UI - Load Control Sizes which calls Full UI - Get Control Position and Bounds, and it also calls TestStand - LoadSizes.  Do these need to be modified?
0 Kudos
Message 3 of 11
(3,965 Views)

I found yet another wierd occurance.  I found the VI entitled "Full UI - Set Front Panel Position and TestStand App Main Window" (png attached).  I noticed some deprecated items in it.  Both are related to centering the front panel, which I don't want to do, so I set the 'true' to 'false'.  When I ran, the login dialog appeared briefly then went away (I didn't get a chance to login) and the front panel NEVER came up. I tried selecting other settings in that VI, but nothing seemed to work.  I ended up abandoning the modifications to that VI and things went back to normal (not working still, as described at the start of this thread).  Thoughts?

0 Kudos
Message 4 of 11
(3,934 Views)

Hi,

 

If you change the values in the config file UserInterface.xml (see attachment - this are the values at the bottom of the file) rather than change the Full UI - ArrangeControls, you will find that all the controls adjust correctly to your new size.

Part of UserInterface.xml file 

 

So changing the value of 925 for 1280 should do the trick.

 

Regards

Ray Farmer

Message Edited by Ray Farmer on 10-21-2008 08:15 PM
Regards
Ray Farmer
0 Kudos
Message 5 of 11
(3,930 Views)

Ray, this resolved the outer border issue.  However, I want to share with you some good & bad that I see (and have seen), imho.

Good:

-         This resolves the elusive border issue and allows me to move on

-         I was probably going to have to update the UserInterface.xml file anyway because (in the execution tab) at runtime, the “Step”, “Description”, “Settings”, etc fields were too wide, and needed customized.

Bad:

-         With this approach, I’m essentially hard-coding the width, correct?

-         I (from another thread) think this approach essentially nullifies any need for most of the VIs found in Full UI Arrange Controls.vi.  I had replaced that VI with one that pretty much did nothing, and most of my functionality was there, but the user could not resize at runtime (which is the ONLY reason I’m attempting all of this).  I’m pretty sure, though that I’m no longer going to make resizing of panes/windows an option.

-         On another (related) program I attempted to modify UserInterface.xml (for the reasons discussed above) and this required me to modify “Full UI – Configure Application Manager.vi” to tell it where to find UserInterface.xml.  I had to do this because the location where it searches for this file depends on who logs in.  This caused a number of privilege issues which I was never able to resolve, but might be forced to address now.

 

Thoughts?

0 Kudos
Message 6 of 11
(3,917 Views)

Hi,

 

Actually, that size of the panels etc, must be hard coded in the VI's, probably taking them from the original size of the panels, maybe. I not sure on this as I haven't identified where they originally come from. If UserInterface.xml is not present, then its generated once you run the User Interface.

 

 If you are using TS4.1, then this would make sense, see below,

ConfigFilePath Property

Syntax

ApplicationMgr.ConfigFilePath

Data Type

String

Purpose

Specifies the path of the configuration file.

Remarks

Once the file has been loaded and you have called Start, the path cannot be changed. The default pathname is
%UserProfile%\Local Settings\Application Data\National Instruments\TestStand %TSVer%\UserInterface.xml.

 Note  This property honors environment variables and the %TSVer% macro. The %TSVer%; macro expands to the current TestStand version number.

 Note  If the UserProfile environment variable is not defined, the pathname defaults to UserInterface.xml in the directory containing the application executable.
 

 

But it also my depend on whats in the environment variable.

Does your users all log-in as the same user type?

 

Ray.

Regards
Ray Farmer
0 Kudos
Message 7 of 11
(3,903 Views)

Ray,

 

It said in that last email "If the UserProfile environment variable is not defined, the pathname defaults to UserInterface.xml in the directory containing the application executable".

 

Where do I look to determine if the UserProfile environment variable is defined. 

Is it saying that if it's not defined, it will look where the exe is located

If I did want to define UserProfile, where would I do that and what (syntax) would I define it as

0 Kudos
Message 8 of 11
(3,888 Views)

Hi,

 

You can determine what the UserProfile is by opening up Windows Explorer and typing in %UserProfile%. You can also determine this my opening up Command Prompt and entering "set" to locate UserProfile. To change this, right-click on My Computer and click on the Advanced tab. You will see Environment Variables at the bottom where you can add UserProfile (it is case sensitive) and change the value.

 

WARNING: Be careful! Because this is not just a TestStand setting, it is a Windows system setting. If any other program uses %UserProfile% then that program will also be affected.

Message Edited by CorbinH on 10-24-2008 09:39 AM
0 Kudos
Message 9 of 11
(3,868 Views)
I typed in %UserProfile% in the Windows Explorer Address field and it seemed to take me to C:\Documents and Settings\myusername (if I did it right).  However,

when I went to the Advanced tab (right-click on My Computer), UserProfile was nowhere to be found.  If I do add it, I assume I would have to add it to the area containing the System Variables.  Any recommended location for this?

0 Kudos
Message 10 of 11
(3,862 Views)