LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Where is the best target location to put configuration files (.csv), report templates (,dotm) and instructions (.pdf) when building a LabVIEW program and installer?

I am unsure of the best location to the above type of support files.  I would like the files to be available to all users accounts.  If I place them into something like c:\LabVIEW support files this can create an issue if manual changes are made to any of these files by a user without administrative rights.  I can also place them into public documents.  Any recomendations?

 

Related.  I have added a PDF "help" file to the project. and given a path in the VI properties documentation field.  I have then added a custom runtime menu with "Help for This VI".  Running the application on my development machine, it works just fine.  Making this in an application installed on a test machine, results in the application crashing.  The PDF file is in the correct location on the target machine.  Any ideas?

0 Kudos
Message 1 of 8
(2,744 Views)

Do you have acrobat reader installed on the other machine? Can you post your code?

 

Michel

0 Kudos
Message 2 of 8
(2,739 Views)

Check how your passing document path (*.pdf).

 

If your using Current VI’s path then you have to write extra code for it.

Check this below links for more info.

http://digital.ni.com/public.nsf/allkb/FD7DE8BC8FFC256C862565F4006BE363

 

https://decibel.ni.com/content/docs/DOC-21242

 

My best Idea is to create one folder (where everyone can access) and place those documents in that folder & read it with LabVIEW.

Munna
0 Kudos
Message 3 of 8
(2,709 Views)

You also have the option of debugging the executable to verify if your path are valid.  To do this check the following option in the build specification:

 

DebugOption.png

 

Then launch you executable. Then do the following:

 

RunTheExecutable.jpg

 

And run the executable by clicking on the run button.

 

0 Kudos
Message 4 of 8
(2,690 Views)

It seems you want to put the files where just any user can't get to them to edit them. Unfortunately, if the user account can't get to them, I don't think LV will be able to get to them. I could be wrong. To test this out, use a target location somewhere under your user account folder and then have another user try to run the app. if LV finds them then that gives you more options. If not, then you are going to have to have a common location that users are not likely to go to.

 

I generally create a dedicated folder structure for LV apps on a target system as shown below.  I also make this the My Documents folder so that the LabView Data folder is created under this structure. Yea, it means that users can get to the files but that's where training needs to be executed.  If you are in a network environment, you can place the templates, config (ini) files, etc on a network location and users are a bit less likely to inadvertently navigate to them.

 

I use both for some apps, Local folders for system specific files and Common folders on the network for files that all systems will share.

 

Not sure if this will address your location issues but thought I would share it nonetheless.

 

LV Folders.png

Doug

"My only wish is that I am capable of learning each and every day until my last breath."
0 Kudos
Message 5 of 8
(2,686 Views)

My method of making files available is to put them in the Public "My Documents".  This is a folder that all users can access.  To "discourage" users from going there and changing things, create a shortcut to each Executable (I like to take the name "- Shortcut" off the Shortcut).  Note that it is helpful to have an Icon build for your Executable, as it will distinguish the Shortcuts.  [Incidentally, I'm assuming you have Administrator rights].  Now you need to move the Shortcuts, which are on your Desktop, to the Public Desktop, so everyone will see them.  In Windows 7, this is in C:\Users\Public\Public Desktop.  However, this is a hidden folder, so you'll need to Organize your Windows Explorer to let you see Hidden Files and Folders.

 

There are two approaches for where to put config files and other data needed by your program.  One idea is to put it in the same folder that the Build routine puts everything else -- this lets you find it relative to the location of the executable.  However, the path will be different during Development (unless you only test the builds).  The other idea is to put it in a fixed location, relative to the system you are using.  For example, my data collection program S-Lab uses Drive E: for a data drive,  There is an S-Lab folder on E:, and I've created Configuration, Template, Documentation, and Experiment Data folders there for the program (and users) to use.

 

Bob Schor 

0 Kudos
Message 6 of 8
(2,657 Views)
Actually, if you use the Application Directory node, the path problem goes away. In development it returns the path to where the project file is, in an executable it returns the path to where the executable is.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 7 of 8
(2,648 Views)

I usually put the any configuration files and report templates in a directory located in the applications directory. As Mike pointed out, it is very easy access this path, i.e: application_directory_path\config_files

0 Kudos
Message 8 of 8
(2,636 Views)