09-22-2011 02:35 PM
Hi,
like to write a "installer"-sequnce that step up a TS from scratch.
It will setup the model, stationglobals, serachdirectories and report options.
this working well so far.
but there is one task which i can not slove. If you have a UI which is has a SequenceFileMgr object.
You see have last opend SequnceFiles inside. by building it from scratch it is empty.
Is there away to access an instance of this object from a running execution and delete all linked files in it
and add some prefered links to it.
So when next time the operators will open the UI they will see the links added by the installer
Regards
Juergen
Solved! Go to Solution.
09-22-2011 03:27 PM
It might be easier than that Juergen,
That information is stored in a file called UserInterface.xml. It is located in:
Depending on your OS (mine is Windows 7) it would be located in C:\Users\<username>\AppData\Local\NationalInstruments\TestStand XX\UserInterface.xml
Not sure where it is in other OS. AppData is a hidden folder so you may have to change your windows properties to let you see hidden files and folders. Consult google or bing on that.
If you look in there you will see where the files are saved that get reloaded with that Property Node set to reload all files. I think the tag is <ReloadArray> You may also have to add to the SelectedArray tag as well. Not sure. Play around with it and you should see it.
09-23-2011 12:27 AM
Hi Jigg,
This would be fallback option B. I agree, this might be easy,
but i would like to use my stuff in old(>=4.0) and future releases of TS.
So my first choise is to access it via the TS-Api. This is more
reasonable because i don't have to take care about the filepath and the structure
of the xml-file of different TS versions.
Thanks
Juergen
09-29-2011 12:45 AM
Hi,
I found a suitable solution for this task within just 3 steps
1. Statement, Get the handle to the AppMgr with RunState.Engine.GetInternalOption(InternalOption_ApplicationManager)
2. .NetStepType, Assembly to UI-Controls, Class IApplicationMgr, Use handle as existing object for class, member CloseAllSequenceFiles
3. dito with member OpenSequenceFile.
Thats all.
With the .NetStepType and handle you may remote control your UI inside your execution.
this is an amazing feature
Regards
Juergen