06-01-2010 03:25 PM - edited 06-01-2010 03:26 PM
I am building an executable that uses LVOOP and I have a few questions. I have noticed people posting some things like this before, but before I go uninstalling/reinstalling I wanted to check.
First, as can be seen in the screen shot, my build is creating folders for my classes in the program files directory. In these folders are the VIs. Why?? I'm not including them in the build.
Also, everything runs fine when i run my executable from this build directory (C:\Program Files\Amplifier Control) but if I move the executable out and try to run it, i get the lower-right screenshot popping up.
The strange thing is, the missing VIs are NOT in the C:\Program Files\Amplifier Control directory, so I guess it is finding them in the development directory (I am on my development machine testing the exe).
I can't post the actual project so screenshots will have to do.
Suggestions?
06-01-2010 03:53 PM
06-01-2010 06:35 PM
I wonder if the Auto-renaming-due-to-conflicts is messing you up... Are you using LabVIEW 2009? If so, consider unchecking the Use LabVIEW 8.x Layout in the build options for the EXE - this will give your exe internal folders so that all of the class VIs can exist within the same thing. It makes EXEs and LVOOP play sooooo much nicer together.
The only thing to watch with this is if you are dynamically calling VIs - the calling logic changes slightly due to the folders... Have a search on ni.com or on the forums - there's a whole bunch of ways to handle this. Of course, if your not calling anything dynamically, then you have nothing to worry about!
06-02-2010 08:19 AM
shew82 wrote:I wonder if the Auto-renaming-due-to-conflicts is messing you up... Are you using LabVIEW 2009? If so, consider unchecking the Use LabVIEW 8.x Layout in the build options for the EXE - this will give your exe internal folders so that all of the class VIs can exist within the same thing. It makes EXEs and LVOOP play sooooo much nicer together.
Not using 2009
The only thing to watch with this is if you are dynamically calling VIs - the calling logic changes slightly due to the folders... Have a search on ni.com or on the forums - there's a whole bunch of ways to handle this. Of course, if your not calling anything dynamically, then you have nothing to worry about!
Not doing this
I'm going to play around with the executable more today and see if I can generate anything else that may be helpful in solving this.
06-02-2010 08:23 AM
In this case its a shame your not using 2009 - they made some serious improvements to LVOOP.
An alternative that might work (I cant remember if when I used this technique my classes were using inheritance or not....) is to creating a separate destination for each of your classes (it can be made even tider if you make those destinations an LLB). This way, the classes's member VIs will all be together and it might play nicer with the EXE...
06-02-2010 08:25 AM
06-02-2010 08:40 AM - edited 06-02-2010 08:41 AM
tst wrote:
LabVIEW uses relative paths to keep paths to subVIs. As you see, some of the subVIs are saved outside the EXE, so if you move the EXE, you need to move the folders that have those VIs as well. I would have expected it actually to show a dialog searching for the VI, but it's been a while since I've had something like this.
Yup, it does show the dialog. The only thing is, I'd prefer not to deliver any VIs with the executable. Is this unavoidable in this case?
06-02-2010 08:42 AM
06-02-2010 08:43 AM
06-02-2010 08:50 AM