LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Linking renamed sub VIs to main VI

Solved!
Go to solution

Hi,

 

I have added a prefix to names of all the VIs and controls in my project.

 

After renaming when I try to open the main VI, it couldn't find the sub VIs hence I am browsing  the VIs manually.

 

I have more than 200 VIs . so , Is there a way to problematically handle this?

 

0 Kudos
Message 1 of 13
(3,888 Views)

Not that I know of.

 

It was a mistake to rename the subVI's while the main VI was not open.  Are you using a project?  I would make sure everything is in a project, then rename the subVI's from within that.

0 Kudos
Message 2 of 13
(3,885 Views)

@Rajesh_10 wrote:

Hi,

 

I have added a prefix to names of all the VIs and controls in my project.

 

After renaming when I try to open the main VI, it couldn't find the sub VIs hence I am browsing  the VIs manually.

 

I have more than 200 VIs . so , Is there a way to problematically handle this?

 


Hi,

    Is the prefix you have added to the Vi's are common or different. If its common you can handle this error

 

Certified-LabVIEW-Associate-Dev_rgb (2).jpg

Certified LabVIEW Developer
Best LabVIEW Programmer @NIDAYS 2015
0 Kudos
Message 3 of 13
(3,858 Views)

SanthoshJoel, how do I handle it if prefix is the same?

Except rename all files back, rename each file in labview? 😃

0 Kudos
Message 4 of 13
(3,849 Views)

I can think of two options, neither one of which is pretty:

1. Rename all of your VIs back to what they were and then rename them inside of LabVIEW.  Note that you could possibly use some scripting to do this for you.

2. Go through all of the search dialogs when you open your main VI to locate all of the renamed VIs.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 5 of 13
(3,837 Views)

This VIP (OpenG Rename Folder of VIs - see attached) may help; if not, look at the source code once installed and modify to suit your needs.

Thanks for your time - Chris
0 Kudos
Message 6 of 13
(3,826 Views)

One way to prevent this from happening again is to always code within the context of a LabVIEW Project.  When your 200+ VIs are in a Project, you will have a Project Explorer (which can look very much like Windows Explorer).  Now, in the Project Explorer (but not in the Windows Explorer), if you rename a sub-VI, it will be renamed everywhere in the Project, and all of the links will remain intact.

 

Bob Schor

0 Kudos
Message 7 of 13
(3,821 Views)

@Alexander_Sobolev wrote:

SanthoshJoel, how do I handle it if prefix is the same?

Except rename all files back, rename each file in labview? 😃

 

Hi Alexander,

                         See to the Below snippet, just pass the folder in which the Vi to be renamed is present. The VI will create a seperate folder and move all your vi to the particular folder with Prefix/Suffix Removed. 

 

 

VI Rename.png

 

 

Kudos Welcome 🙂

 

Certified-LabVIEW-Associate-Dev_rgb (2).jpg

Certified LabVIEW Developer
Best LabVIEW Programmer @NIDAYS 2015
Message 8 of 13
(3,794 Views)

HI ,

I would like to add few more details to my query.

 

1. All these VIs are inside a project as a auto populated folders.

2. I have added a common prefix to all these VIs.

3. I have closed the project and renamed the VIs in  programmatic way as in the attachment.

0 Kudos
Message 9 of 13
(3,784 Views)

Is your problem now solved?

 

If not, then have you followed our advice?  The advice is to NOT put the prefixes in your subVI's.  Rename them back to what they are when you originally created the program.  Load your project to make sure nothing is broken.  Then rename the VI's from within the project environment.  (Do just a few to start with to make sure it is all working.)

 

If you insist on renaming VI's outside of the project, then I'm afraid you are just going to have to resolve each of the missing subVI's telling LabVIEW what the new names are when you load your project.

0 Kudos
Message 10 of 13
(3,765 Views)