LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting VIM to VI Instance (Scripting)

Hi All,

 

I've been having issues generally with VIMs and thought I would just create a scripting tool that quickly converted VIMs to VIs (and make it a QD shortcut or similar). Anyway, the 'replace' scripting method doesn't like replacing VIMs with VIs.

 

Here's some proof of concept code I've been playing with - hopefully, someone can see an obvious mistake. - I don't really want to have to "delete the SubVIM, insert new VI, rewire...".

 

Order of operation:

  1. Get a reference to SubVIs and filter for VIMs
  2. Create a copy of the VIM and save as a VI
  3. Replace VIM with new VI

Converting VIM to VI.png

Does anyone have any thoughts on why this doesn't work / quick workarounds (quicker than deleting, placing, rewiring etc)?

 

Cheers,

Tom

0 Kudos
Message 1 of 3
(1,944 Views)

May I ask what issues you had with VIMs? I had some with LV2018 before SP1 (or was it SP2...). I am using them as often as I can now and haven't had a hiccup since then.

Certified LabVIEW Architect
0 Kudos
Message 2 of 3
(1,924 Views)

You're right, it doesn't work.  I don't see anything wrong, but I kind of remember having problems with the Replace method some time ago.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 3 of 3
(1,855 Views)