the_mitten Posted August 6, 2018 Report Posted August 6, 2018 Has anyone found any properties or methods associated with malleable VIs? Specifically, I was hoping to find a way to invoke the "Convert Instance VI to Standard VI" function after confirming that a selected VI was indeed malleable. LabVIEW reports the class type of a selected malleable VI on the block diagram as a standard Sub VI, and I didn't see any properties/methods under the VI class. I'm exploring what it would look like to make a utility to convert a malleable VI into a polymorphic VI for the purpose of backwards compatibility. I'd like to have a reference library that uses malleable VIs but create a version that is still accessible to someone using older versions of LabVIEW that don't officially support malleables. Quote
jacobson Posted August 6, 2018 Report Posted August 6, 2018 I couldn't find a method for "Convert Instance VI to Standard VI" as you can from the right-click menu but it looks like if you get the VI reference from the subVI you get a reference to the instance VI so you could potentially just copy the block diagram and put it into new VI (reconnecting the terminals might take some work). I'm not sure what the best way would be to figure out whether the subVI is a VIM. If you grab the subVI reference and try to pull the VI Path you just get <not a path> and the VI name returns some crazy UID. 1 Quote
Darren Posted August 6, 2018 Report Posted August 6, 2018 2 hours ago, jacobson said: I'm not sure what the best way would be to figure out whether the subVI is a VIM. It may surprise you that this is the best way: 1 Quote
ShaunR Posted August 6, 2018 Report Posted August 6, 2018 1 hour ago, Darren said: It may surprise you that this is the best way: It does surprise me. I would have thought an entry for VI Type would have been added to the enum. Quote
Darren Posted August 6, 2018 Report Posted August 6, 2018 19 minutes ago, ShaunR said: It does surprise me. I would have thought an entry for VI Type would have been added to the enum. Yeah, I think the explanation given to me was that the contents of the .vim file on disk are no different than the contents of a .vi file on disk. So since it's technically not a different file type, they thought it didn't warrant a new enum entry. Kinda like how there's not a "Template VI" entry in the list since .vi and .vit are the same type on disk. I may be misremembering though so don't take this as the official answer. Quote
the_mitten Posted August 6, 2018 Author Report Posted August 6, 2018 3 hours ago, Darren said: It may surprise you that this is the best way: Huh. Yeah, I didn't expect this. Doesn't this suppose that the user hasn't changed the displayed label text for the subVI? Quote
Darren Posted August 6, 2018 Report Posted August 6, 2018 51 minutes ago, the_mitten said: Huh. Yeah, I didn't expect this. Doesn't this suppose that the user hasn't changed the displayed label text for the subVI? It's impossible to change the label text of a subVI. That's why this works. Quote
the_mitten Posted August 10, 2018 Author Report Posted August 10, 2018 On 8/6/2018 at 6:33 PM, Darren said: It's impossible to change the label text of a subVI. That's why this works. Interesting! Didn't realize that. Thank you! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.