LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

project conflict with dynamically called VIs

Solved!
Go to solution

   I have a largish project in LV 2010 in XP and W7.  It's all in a project, as I build the main VI into an .exe.  There are numerous other top-level VI's that are called dynamically.  I use source code distributions to build them with their diagrams removed.  The .exe then calls them from a directory similar to "C:\DMT\My Project\Utilities".  (I never did find a good utility for discovering user directories across XP, W7, etc., so we ended up right in C: for config files and support files, stuff that often used to get put in with the .exe in XP and earlier OS's.)

   Besides the top-level VI's, I also have a set of VI's that can be called dynamically to do custom calculations.  The interface to each VI is simple and defined, so users with LV can create their own calculations, put their VI (and sub-vis) in "C:\DMT\My Project\Calculations", and my program can make a call to it.

   My problem is in how the project handles these VIs.  I need to include them in the project, since I need source code distribution builds to assemble a directory of the VI and all its dependencies.  So the actual source is in one place (under SVN), then I build them to another location, which I then deploy to "C:\DMT\My Project\Calculations".  The problem is, if I run the main program from within the project (rather than as an .exe), it links up to these calculations in "C:\DMT\My Project\Calculations" and then the project has conflicts.  The Calculation VI's in the project are now trying to point to "C:\DMT\My Project\Calculations" (which isn't in SVN) instead of to the true source code.  Every time I run the program from the project, I have to remember to go and manually fix the project.

   Sorry if that's a bit complex to describe.  But does anyone have suggestions on an alternate architecture that would eliminate this issue?

 

Thanks,

   DaveT

-------------------------------------------------------------
David Thomson Original Code Consulting
www.originalcode.com
National Instruments Alliance Program Member
Certified LabVIEW Architect
Certified Embedded Systems Developer
-------------------------------------------------------------
There are 10 kinds of people: those who understand binary, and those who don't.
0 Kudos
Message 1 of 5
(2,400 Views)
Solution
Accepted by topic author Dave_Thomson

A simple solution would be to detect if you're running the exe or the vi (app.kind property).

When running in development version call the dynamic VIs from the svn directory (usually a relative directory to the main VI), when running the exe call the VIs from the distribution directory.

 

Message 2 of 5
(2,396 Views)

Thanks!  I'll try that.  (Wondering why I didn't think of that...)

-------------------------------------------------------------
David Thomson Original Code Consulting
www.originalcode.com
National Instruments Alliance Program Member
Certified LabVIEW Architect
Certified Embedded Systems Developer
-------------------------------------------------------------
There are 10 kinds of people: those who understand binary, and those who don't.
0 Kudos
Message 3 of 5
(2,394 Views)

That worked.  Thanks again for the idea.


DaveT

-------------------------------------------------------------
David Thomson Original Code Consulting
www.originalcode.com
National Instruments Alliance Program Member
Certified LabVIEW Architect
Certified Embedded Systems Developer
-------------------------------------------------------------
There are 10 kinds of people: those who understand binary, and those who don't.
0 Kudos
Message 4 of 5
(2,380 Views)

 

Great! Thanks for reporting back.

0 Kudos
Message 5 of 5
(2,372 Views)