07-08-2014 02:04 PM
Hi,
I have an existing LabView program that uses SubVI blocks. I want to change it so that I don't need to copy SubVI files to the library (when I transfer the program to another computer). The goal is to have ONE single file/program that I can copy, paste, and run on other computers. So I want to know if there is a way to create hierarchy without creating SubVI files or how to embed the SubVI into the program. My program and the subVI files are attached here.
Thanks,
Rocky
Solved! Go to Solution.
07-08-2014 02:10 PM
You could create a build into an executable. That would be the most common way if you insist on having just one file.
You could also build a source distribution into a zip file. Then you just copy and paste the zip file and unzip wherever you want it.
07-08-2014 02:21 PM
Hi rocky,
your problem isn't to have all in ONE file:
That's your VI in the Navigation window (after AutoCleanUp) on a FullHD screen (marked by the brighter rectangle in the upper left corner).
It's way to big and all I can recommend is: Use MORE subVIs!
07-08-2014 02:22 PM
You could also make an llb, and even designate the toplevel VI.
However, this is ancient technology and not often used anymore.
07-08-2014 04:37 PM
How do I make it into an executable? (That is probably my solution.)
I know I have a "large" code; I am still trying to clean up the mess whenever I have free time.
Thanks.
07-08-2014 04:44 PM
I searched the web on "how to create executable" and I don't think my version supports that feature. I will probably need to bundle all the subVIs. Thanks for all the help. (I kind of know I don't have that feature, that's why I asked if I can "embed" the subVI into the code.)
07-08-2014 07:38 PM
07-09-2014 06:57 AM
@MPS_Rocky wrote:
I searched the web on "how to create executable" and I don't think my version supports that feature.
You will need to be using the Project. You should be using a project anyways to keep your code organized and easily accesible. But at the bottom of the project tree is a section for Build Specifications. Right-click on that and you will see an option to create an executable. You will need the Full or Professional version or LabVIEW to have the Application Builder.
07-09-2014 07:46 AM
In some versions of LabVIEW you can go to Tools >> Build Application. This simply makes a project, adds your VI to it, and then adds the EXE to the build specifications.
But I totally agree that you should be working from a project. In other programming languages you wouldn't think of opening one file at a time in a text editor, you would open the project in the IDE. And if you did this you wouldn't think of having just one text file, you would break it up into classes, or other sub-functions.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
07-09-2014 08:57 AM
The advice you've received here is pretty solid. Putting everything into the single VI makes your code a bit harder to read. It sounds like you've inherited code that was already a bit hard to read.
The one piece I wanted to add was to bring up the Application Builder tool others have suggested using only comes with the Professional Development System and not with the Full Development System.