I am not sure whether I understand your question correctly, but if you want to test whether a VI is called by another VI or running top-level, there are a few ways:
1) Check the length of the array returned by the Call Chain function in the Application Control menu.
2) Create a reference to the VI with Open VI Reference from the Application Control menu, and then test the execution state with a property node from the same menu.
Martin