Jump to content
lvb

Replacing Missing VI's and Objects

Recommended Posts

I am attempting to create a scripting VI that will replace missing VI's and other LabVIEW objects (type defs, classes).  I would like to specify the fully qualified name of the old item and the path to the new item.  Any tips on how to do this?

 

 

At this point, I can Traverse for GObjects but am having some trouble identifying the properties of the missing VI's.  The scripting nodes return the following error at the VI Name property node when the VI is missing:

 

Error 1099 occurred at Property Node.
Possible reason(s):
LabVIEW:  Scripting: SubVI is not loaded.
 
post-4274-0-63896900-1361234636_thumb.pn
 
 

 

Replace SubVI Test.vi

Share this post


Link to post
Share on other sites

If you read the VI Name property of a subVI and it returns error 1099, then it's a missing subVI. At that point, you could read the Label.Text property of the subVI to get the name of the missing VI being referenced. To my knowledge, there is no way to retrieve the fully qualified name of a missing subVI.

Share this post


Link to post
Share on other sites

If the original VI does not exist any more, you can use the property "MissingVIName" to get its name (I'm using LV2019SP1).

grafik.png.e06b7742f36532c38095d5ec743538e5.png

 

I created a VI that recursively replaces all missing VIs based on a lookup table.
So far this works fine with missing VI but it does not work with missing *.ctl files (type def) for controls or constants because there is no "MissingTypeDef" property available.

grafik.png.16ff38054086aabe1a0d9b52e3e9648b.png

Does anybody have an idea how to get the missing ctl-file name?

 

Thanks in advance!

 

Edited by AndyS

Share this post


Link to post
Share on other sites

I don't have a solution to this but am interested in the topic.  Darren also recently mentioned that this should work in 2020 for VIMs without the hacky work arounds found here.

Share this post


Link to post
Share on other sites

Unfortunately there is currently (as of LabVIEW 2019) no comparable functionality to the Missing VI Name/Missing VI Path from subVIs for typedefs, nor is this functionality going to be in LabVIEW 2020. I suggest posting this request on the LabVIEW Idea Exchange. It would be a useful feature for tooling like what you've described.

Share this post


Link to post
Share on other sites

Oops, looks like I missed when this feature went in. As AristosQueue mentioned in a reply to your Idea Exchange post, you can use the Dependencies > Missing Dependency Names and Dependencies > Missing Dependency Paths properties of the GObject class in LabVIEW 2015 and later. Can you verify that these properties give you want you need, and I'll close out the Idea Exchange post as Already Implemented?

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.