FIRST Tech Challenge Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot disconnect subVI from Library

We have some subVIs that we are sharing between robotics projects.  Most of the subVIs are mostly mathmatical so no ties to the motor configuration constants.  When I take a subVI from project A and try to use it in project B it has a broken run arrow.  The error listed is that it cannot find project As .lvrbt file and says to go to the menu and "disconnect from library".  When I disconnect, nothing happens, I still have a broken run arrow and the main VI is inop.

Thanks in advance,

-Steve

0 Kudos
Message 1 of 4
(4,242 Views)

Hey Steve,

If you want to use VI's in multiple projects you will want to add them in the project window using Add VI (not by moving them around on disk).  This will ensure all the dependencies are updated appropriately.  Using this method will actually create a copy of the VI in each project so you could run into issues with multiple versions of the file if you are making changes to the file and expect them to be updated in both projects.  Not sure if there is a way around that or not but I can look into it.

Kevin Fort
Principal Software Engineer
NI
0 Kudos
Message 2 of 4
(3,140 Views)

Kevin,

Okay, I copied the file from project A to project B then used the ADD button.  I did not know the Add button created a copy, I didn't want to link to a VI from one project into another.  I will try this tonight.

Thanks,

-Steve

0 Kudos
Message 3 of 4
(3,140 Views)

I ALSO had a heck of a problem with this while I was developing some code that tried to share VIs.

To use a VI from one project in another, the safest thing to do it to ADD it to the new project by pointing to the VI in the old project.

LVLM will make a copy of the VI in the new project, disconenct it from the old project, and connect it to the new project.

The lesson I learned was NEVER manually (using explorer) move/copy/delete VIs when using LVLM.  You invariably end up with that error, or the VI is unknowingly linked to VIs in another folder.

You really need to use the project tools on the LVLM page.  Unfortunately there isn't a "rename" capability, so you need to plan projects vary carefully

I would recommend that NI should to create a "Best Practices" document for LVLM when it comes to sharing VIs and CTL's between LVLM projects.

LVLM also has the ability to have project templates, but you also need to be really carefull what you put in these.

If you include Type Def CTL's, when you create a new project based on the template, the new project still refers back to the CTL's in original template folder.

Get a life? This IS my life!
0 Kudos
Message 4 of 4
(3,140 Views)