06-08-2021 03:53 PM
Inside each instance of an Express VI is a tag named "_OriginalInstancePath". LabVIEW automatically manages the value therein. It is the path to the original instance VI relative to the VI that owns the instance. If you copy an instance of an Express subVI to another VI, LabVIEW fixes up the path; except if the destination VI is unsaved, in which case the _OriginalInstancePath remains unchanged. For the built-in NI Express VIs this isn't a problem (probably because they're using symbolic paths to vi.lib). However in my case the _OriginalInstancePath is something like "..\..\..\..\..\Common\GUI\BD Standard Dialog Box.vi"; which when combined with the <Not a Path> location of the unsaved VI results in <Not a Path> and then my configuration VI can't find the original instance. I'm looking for ideas on how to have my configuration VI deal with this situation.
I'd rather not hard code the path because I'm averse to such un-robust code.
(I know that we're supposed to put our roll-your-own Express VIs in <user.lib> (which would probably eliminate the problem), but for source control reasons, I put them on Drive X:).
Solved! Go to Solution.
06-08-2021 06:49 PM
After pondering this a while, the solution eventually came to me, and then seemed obvious: Just use a static VI reference to the original instance VI and extract the path from that.