Functional Description
This post is to support KnowledgeBase 4SA8N6CX:How to Create Child LabVIEW Libraries (lvlib) Using Distributed System Manager (DSM) and LabVIEW Dat.... Please refer to this KnowledgeBase for more information on the modifications made during the below process.
In some applications it is desirable to have the Shared Variable Engine structure to match that of the real world application. For example, if you had multiple power stations, with multiple generators - but each generator has the some parameters you wish to monitor, then it would be good if the user could see the variables in this structure. In order to achieve this we need to be able to programmatically create child (sub) libraries for the shared variables. This can easily be done manually in the LabVIEW project but currently programmatically this functionality doesn't exist.
The solution is to programmatically edit the xlm data for the LabVIEW libraries (lvlib) files to include the required information for both the parent and child (sub) libraries. The attached example in LabVIEW 8.6 adds the information to the two library files as discussed in the KnowledgeBase article.
Caveats and Additional Notes
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.