LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically manipulate .lvproj/.lvlib files

Hello,

 

Is there a way to programatically manipulate .lvproj/.lvlib files? I found the Project:Open invoke node, but that only lets me query the project, not change it. There's also LabVIEW VI Scripting, but that seems to only support modifying VIs.

 

I'm asking because I want to write a tool to automate the creation, binding, updating and verification of Shared Variables. My team had to rename and remap variables for a large pilot plant controller (due to a change in cRIO chasses and modules), and it was... tedious. The Multiple Variable Editor and direct XML manipulation helped slightly, but the process could still be better.

 

 

Thanks!

Certified LabVIEW Developer
0 Kudos
Message 1 of 4
(3,072 Views)

Scripting allows you to programatically modify and query a project.  However, the items will not be visible if you have not enabled scripting in your Tools»Options menu.  Select the VI Server tab and ensure the VI scripting items are checked.  This will open up the Project properties of App.  Then the fun begins...  Post issues as you run into them.

Message 2 of 4
(3,048 Views)

Have you looked at the DSC Module?

 

You can create Shared Variables programmatically through this, rather than just accessing programmatically through the Data Communications palette.

---
CLA
0 Kudos
Message 3 of 4
(3,044 Views)

@DFGray wrote:

Then the fun begins...  Post issues as you run into them.


That's great foresight 😄 Thanks for the gem; I'll start playing with VI scripting.

 


@thoult wrote:

Have you looked at the DSC Module?

 

You can create Shared Variables programmatically through this


We're using the DSC module for data logging, which is why we need to bind PC variables to CompactRIO variables. However, the DSC module's Shared Variable VIs only work on the PC; we need to query and manipulate variables on RT targets too.

Certified LabVIEW Developer
0 Kudos
Message 4 of 4
(3,022 Views)