I have a VI that can be run both directly as the Top Level VI and also as a subVI of a larger project. I would like to be able to adjust some parts of the VI (ex: hide some of the Controls from view when run as subVI) depending wether the VI is run as the main program or a subVI. So I'm looking for a way to programatically determine if the VI is being run independently or as a subVI...or as subPanel of another VI.
I previously found another post somewhere suggesting to use the Call Chain function. If the array length returned from Call Chain is >1, then you know that the VI is being called as a subVI. This worked great untill I decided it would be nicer to have the VI in a subPanel of the main VI instead of having the subVI pop-up as a new window. When the subVI is called as a subPanel item, the Call Chain only returns 1 item (like its run as a main VI).
Any suggestions on how i can determine if the VI is run in a subPanel instead of as the top level VI?