From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Exception in TSUI.IApplicationMgr (LabVIEW TestStand OI)

Hello,
    I'm trying to modify the NI Full-Featured LabVIEW OI, and I keep getting an error dialog when I re-run (stop then run again) the OI.  If I close all windows that contain a 'TestStand Application Manager' reference, this error goes away.  This error message only (and always) occurs the second time (and afterwards) I run the OI, never the first time.  This problem persists across machines but does not occur with the stock NI Full-Featured OI.  Terminating the TSAUTO~1.exe process does not fix this problem.  This error dialog does not source an error and occurs inside the IApplicationMgr.Start invoke node.
    The complete error message in the dialog is, "Exception occured in TSUI.IApplicationMgr, There are two copies of ApplicationMgr control.  in Full OI - Top-Level.vi"
    Has anybody else encountered a problem like this or a solution?
    (Should this be in the TestStand board?)

Thanks,
Tony

Edit:  LabVIEW 7.1, TestStand 3.1, P4HT 3.2Ghz, 1Gb RAM

Message Edited by Tony Kuiper on 11-08-2005 02:44 PM

0 Kudos
Message 1 of 3
(3,618 Views)
Found the problem:
    Use one, and only one, instance of the TestStand Application Manager control.  (This is already present in the Full-Featured OI and is actually an Active-X container.)  Everywhere else you need access to the ApplicationMgr, use an Automation Refnum linked to TSUI.IApplicationMgr.
    Placing multiple Application Manager containers (as opposed to Refnums) will create multiple instances of the TestStand control.  The fact that doing this will still allow access to the current Engine instance seems to be a fluke.

Tony
Message 2 of 3
(3,608 Views)

Hi,
You may want to try "Application Manager"'s "Shutdown" method and close the reference after.
I think it keeps Application Manager open until you close your VI. And second run tries to create another instance over existing one which brings the error.

Message 3 of 3
(2,622 Views)