LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why do Source File Settings in LV 8.0 Source Distributions not seem to work?

When I set up a source distribution in LV 8.0, I set the inclusion type for a support library that I use. Since the support library contains many subVIs that I do not use in my application, I have it set to "Include if Referenced." I take this to mean inclusion of any subVIs that are (statically) linked to an "Always Include" VI; basically my application.

This does not seem to be the case, as the results of the SD build always contain everything (all VIs in the entire support library, whether linked to my app or not). Why is this? How can I get it to include only the VIs that the application is linked to?
0 Kudos
Message 1 of 7
(2,887 Views)
Derek -

I was able to create a source distribution based off a VI using subVIs included in a .llb file.  Here is what I did to include only the files needed in the distribution and not the entire .llb file. 

In my project, I included both the top-level VI and the .llb and then created my source distribution.  In the Distribution Settings page of the dialog box, I kept the default selections:  Exclude vi.lib and  Exclude user.lib both checked and Exclude instr.lib unchecked.  The example I am using is from a .llb file from an instrument driver.

In the Source File Settings, I kepts my the top-level VI with the inclusion type as Always include, the .llb file as inclusion type to Include if referenced, and kept the dependencies inclusion type as Include if referenced.

After I built my application, only my top-level VI and its dependencies were included in the source distribution.

If you continue to experience the same problems, can you post your entire project file using the Zip File build specification feature?


Mark Walters
Application Engineer
National Instruments
0 Kudos
Message 2 of 7
(2,866 Views)
Thanks Mark,

By library I meant the new project library (not the LLB file). My project has one project library for the project (task) specific code. I have assembled code that I reuse often into another project library which I call my support library. It is convenient to simply include this library in each new project. From what I am able to find out, this is the way NI intends code to be reused in LV8+.

The problem I have is that my entire support library is folded into the output of a source distribution, regardless of what File Settings I use (Include if Referenced...) for the support library. The output of the source distribution works (code runs correctly), but it has many, many more files than it needs by including my entire Support Library.

Any ideas?
0 Kudos
Message 3 of 7
(2,860 Views)
Hello,
 
You could put all your VIs into a folder, and then set the inclusion type of the entire folder (see the "Set inclusion type for all contained items" checkbox) to "Include if referenced" - that should do the trick 🙂
 
Best Regards,
 
JLS
Best,
JLS
Sixclear
0 Kudos
Message 4 of 7
(2,838 Views)
By folder, I assume you mean one from within the LV project?

I tried that, put the support library inside, and set the inclusion type for the project to "Include if Referenced." Same problem. Everything inside the support library shows up in the SD build.

FYI: My LV project only 1 item beneath the project in the tree control, "My computer." Under that, I have 4 items; the main application code library, the folder I just created above that contains the support library, Dependencies, and Build Specifications.

Note that I did not create a directory on the HD anywhere, I only created a folder in the LV project.

Any other ideas?
0 Kudos
Message 5 of 7
(2,828 Views)
Hello,
 
Perhaps there is a misunderstanding then.  Attached is a screenshot with descriptions showing how a folder (in the project) containing VIs (some of which are used by an "always included" VI and others which are not) can be added to a source distribution as "include only if referenced" so that only VIs used in the "always include" VI will actually be included in the source distribution.  I also show the resulting source distribution there.  If you have a case where LabVIEW behaves differently, please attach screenshots so that I can try to reproduce the problem with folders as well.
 
Thank you and I hope the screenshot helps!
 
Best Regards,
 
JLS
Best,
JLS
Sixclear
0 Kudos
Message 6 of 7
(2,808 Views)

Hello,

You might also want to try placing a check in 'Disconnect type definitions and remove unused polymorphic VI instances' under  'Distribution Setting' for a source distribution.  This should stop VIs that are not referenced from appearing in your source distribution that are contained within an lvlib.

Jesse O.
Applications Engineering
National Instruments

Jesse O. | National Instruments R&D
0 Kudos
Message 7 of 7
(2,756 Views)