04-30-2019 02:30 PM
@Darren wrote:
You're almost there. The instance VI has a tag called "_OriginalInstancePath". That should give you what you need.
I've found my "user-created" malleable VIs don't have this tag (using 2017 SP1). Is this in a later LabVIEW version, or is there another way to expose this information? Thank you.
04-30-2019 02:38 PM
Make sure you're reading the tag of the *Instance VI*, and not the original .vim file on disk.
To get a reference to the instance VI, you need to get the SubVI reference, then read the "VI Reference" property of the SubVI class. That VI reference should have the _OriginalInstancePath tag.
02-10-2020 03:25 PM
So I'm back. Is there a way to get the path to where a missing VIM should be? If you open a VI that calls a VIM that is missing the Missing VI Path returns something like:
VI With Missing VIM.vi\24edcdda-8bcb-4068-8b29-7aae0b30ca25.vi
or is empty. I'm renaming a bunch of dependencies and I want to scan, and fix dependencies for VIs that might have called the old one. So I open the VI (possibly without referees). Look at the path of the missing VI, see if it is one I renamed, and if it is replace it with the path on disk to the name of the new one. But for this to work I need to get the path to VIMs too. Attached is a VI that calls a VIM that is missing, and another VI that has some attempts at finding the path to the missing VIM. If you just open the VI and put context help over it you can see where the path should be, but how do I get that programatically? Thanks.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
02-11-2020 07:53 AM
@Hooovahh wrote:
So I'm back. Is there a way to get the path to where a missing VIM should be? If you open a VI that calls a VIM that is missing the Missing VI Path returns something like:
VI With Missing VIM.vi\24edcdda-8bcb-4068-8b29-7aae0b30ca25.vi
or is empty. I'm renaming a bunch of dependencies and I want to scan, and fix dependencies for VIs that might have called the old one. So I open the VI (possibly without referees). Look at the path of the missing VI, see if it is one I renamed, and if it is replace it with the path on disk to the name of the new one. But for this to work I need to get the path to VIMs too. Attached is a VI that calls a VIM that is missing, and another VI that has some attempts at finding the path to the missing VIM. If you just open the VI and put context help over it you can see where the path should be, but how do I get that programatically? Thanks.
I did a bunch of digging, but couldn't find it. If you open "VI With Missing VIM.vi" with a text editor, you can see the missing path; it appears to be somewhere inside the inlined code, but I was unable to find a way to access it.
02-12-2020 09:17 AM
@Hooovahh wrote:
So I'm back. Is there a way to get the path to where a missing VIM should be? If you open a VI that calls a VIM that is missing the Missing VI Path returns something like:
VI With Missing VIM.vi\24edcdda-8bcb-4068-8b29-7aae0b30ca25.vi
or is empty. I'm renaming a bunch of dependencies and I want to scan, and fix dependencies for VIs that might have called the old one. So I open the VI (possibly without referees). Look at the path of the missing VI, see if it is one I renamed, and if it is replace it with the path on disk to the name of the new one. But for this to work I need to get the path to VIMs too. Attached is a VI that calls a VIM that is missing, and another VI that has some attempts at finding the path to the missing VIM. If you just open the VI and put context help over it you can see where the path should be, but how do I get that programatically? Thanks.
This code is damn ugly, and not particularly robust, and you'll need to do a bunch of testing on it; but it works (in this case).
02-12-2020 11:14 AM
Seriously thank you. I did have to make a minor change to support the Open Without Refees. I didn't really want the browse dialog to come up and have to click Ignore All over and over but using that meant that the Buffer read back didn't have everything it needed. So I used a Read Text File, reading the whole file on disk instead of saving it as a buffer and that seems to work...again in this case.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
02-12-2020 02:45 PM
I actually look like this:
I'm the kind of guy who will wear a bright red zoot suit to Disneyland.
02-17-2020 02:11 PM
Just found a bug a short time ago (though it's been there all along). It wouldn't work of the class was owned by a library (It was just using the class name instead of the qualified class name). That's fixed now.
02-20-2020 03:24 PM
FYI to everybody on this thread, the 'Missing VI Name' and 'Missing VI Path' properties of the SubVI class should work properly for missing Malleable VIs in LabVIEW 2020, barring unforeseen difficulties.
02-24-2020 11:10 AM
A much simpler version