As part of a script I am writing, I need to programmatically run the configuration dialog of an Express VI. Any thoughts on how to do this? Btw, if I programmatically open the Express VI and and invoke the Run VI method, it runs the source VI rather than the configuration VI.
Is the express VI already on the diagram of your VI?
All dropped express VI have 3 key components,
1. Configuration VI, [cfg], which exists on disk and has a common connector pane and can be called dynamically.
2. Source VI, [src], which exists on disk and who's connector pane will be utilized when dropped in a VI. Embedded within the VI Tags property is a path to the configuration VI. That is how a dropped express VI knows what to call for configuration.
3. Instance VI, [instc] , which actually does not exist anywhere on disk, but instead is a VI embedded into the source code of the block diagram. This VI in memory wraps the [src] and (typically) does nothing more than call that [src] VI. It's connector pane is a replica of the SRC VI and the icon is replicated as well.
If you want to call the configuration of an express VI programmatically, the best way to start is to get a reference to the instance Sub-VI node on a block diagram.
Once you have this sub-VI reference, you can get the VI reference to the [instc] that exists in memory.
Once you have the VI reference, you should be able to extract the VI Tag '_Wizard' which will return a path to the [cfg] of the express.
Once you have the path to the [cfg], you can call it dynamically through the 'Call by Reference Node' and pass it the needed parameters
<a href="http://content.screencast.com/users/NJKirchner/folders/Jing/media/8d23b608-3538-4f60-b34e-ac7d5aeb7cfa/2010-03-24_1619.png"><img class="embeddedObject" src="http://content.screencast.com/users/NJKirchner/folders/Jing/media/8d23b608-3538-4f60-b34e-ac7d5aeb7cfa/2010-03-24_1619.png" width="216" height="69" border="0" /></a>
When you make that dynamic call, you can see that it needs 3 references
ParentVI :: Reference to the VI that has the instance of the express VI on it's block diagram
VI :: Instance VI reference
subVI :: Instance VI reference as a Sub-VI on the Parent VI's block diagram
If you properly provide these references to the configuration VI, the configuration dialog should pop-up, allow you to configure the node, commit the changes, go away properly.
If the express VI is not on your block diagram already, dropping it programmatically should act just as if you had dropped it manually without invoking the dialog.... but i'm not 100% sure about that operation.
I'm sorry but I am a self-taught Labview user and not that bright, so I don't understand what "private method of the Node Class to Launch Config" means. I did manage to put a configuration VI on the panel that looks just like the picture above, by going to "Select a VI..." on the block diagram in inserting the configuration VI directly. Is this what you are talking about?
Also, I found the subSource VI but I can't figure out how to create a reference to it, since I can't use "Open VI Reference." Does anyone any suggestions?