Jump to content

Programatically replace renamed sub-vis


Recommended Posts

I have a <user.lib> LLB that's about ten years old. It's been updated and recompiled without problems for all these years.

During analysis for an upgrade (from LV 7.0/TS 3.0 to LV 8.6/TS 4.1.1), I discovered that several of the VIs contained in this LLB use non-standard names (contain /\<>? characters). TestStand 4.1 would go into an endless loop and hang when trying to load a step pointing to a VI in an LLB with a non-standard OS name. This was reported to NI, and is fixed in TestStand 4.1.1.

I'm concerned about leaving these oddly named files 'as is'. I've read a few problems/rants on the NI forums with respect to NI's use of these non-standard naming conventions in LLBs, and have a fear (probably unnecessary) that support for the LLB may be dropped in a future version.

So....

I can rename the VIs. All calling VIs will break, and all TestStand sequences will error when run.

My sequence files are stored as INI text files, so I can perform a simple 'search and replace' to fix the calls.

How can I programmatically replace calls to these sub-vis from within a vi? I've been poking around in the 'optional' App methods and properties, but haven't found much. The only promising thing was Linker:Read Info and Linker:Write Info.

I renamed one of the offending VIs. I used Linker:Read Info and was able to evaluate a VI that calls the renamed VI. It appears that the Path and delimited name are the same for a VI that cannot be found.

I know what the old name and new name will be, and they will have the same path. I plan to leave the renamed files inside an LLB for now, and if the LLB construct goes away or I want to start using source control, I will use the LLB Manager to convert the LLB to a folder and be done.

There are references to the Linker: methods in the wiki entry for Pseudopath, but I can't figure out how the methods work :(

Link to comment

What would be the most simple:

Open up all the VIs you are ever interested in and do a 'Save machine' on the offending VIs. That should do.

Or open up all VIs, do a find (ctrl-f) and do a replace (new feature in LabVIEW 8.5/8.6)

What you could do is place the 'new name' inside the VI with the 'old name', and let the 'old name' VI write to a log-file if it is called.

After some time you know exactly which VIs are calling the 'old name'. Keeping this routine in place can be very usefull.

Ton

Link to comment

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.