LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can you quickly update all the references to a typedef when you rename the .ctl file?

I use queue driven state machines with events, states and actions made
of enum lists saved as typedefs. The skeleton of any such VI is very
generic but has a good deal of code and quite a few references to the
typedefs. When I make a copy of this skeleton to create a new program
component I rename both the VI and the corresponding .ctl files
containing the typedefs. Of course, when I open the VI LV doesn't find
the typedef files and it doesn't allow you to point to the renamed
ones! It takes quite a while every time to individually replace all
the controls and constants linked to the old typedef filenames with
the ones linked to the renamed typedef files. Is there a faster way of
doi
ng that?
0 Kudos
Message 1 of 3
(2,147 Views)
Save them as strict typedefs.

With all VI's closed do new VI and drop the updated type def (still with original name).

Open the top level VI of your app. LV will now be using the updated type def.
Do search find instances of type def.
Open one and save as new name.
Go back to search screen and goto next.
Replace all intances one at a time.
Save everything.

It aint easy but it gets you there.

Remeber it the VI name that is what LV is looking for. You can't point at a diferent name. You have to replace each instance individually.

In a dream I had once, I thought I remeber doing a "replace all intasnces" but I have not been able to find this option lately. I will watch to see if this is somewhere I have not been able to find.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 3
(2,148 Views)

Ben wrote;

"

In a dream I had once, I thought I remeber doing a "replace all intasnces" but I have not been able to find this option lately. I will watch to see if this is somewhere I have not been able to find.

"

That was a vision not a dream. See here.

http://forums.ni.com/ni/board/message?board.id=170&message.id=196850#M196850

Smiley Tongue

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 3
(1,967 Views)