LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

New Projects default location points to other user's home directory

Solved!
Go to solution

We install Labview in a classroom environment. When students log in and create a new project in Labview the project root defaults to the home directory of the first student who launched Labview. Is there a way to set the default path or configure it to point to the current user's home directory? Thank you

0 Kudos
Message 1 of 3
(642 Views)
Solution
Accepted by topic author Thomas_H

I don't really have experience with playing with that dialog or with using a system with multiple users, but looking at the source code (specifically <LabVIEW>\resource\dialog\NewProjectWizard\NewProjectDialog.vi), you can see the following:

 

 

NewProjectWizard.png

 

It looks like if the INI key exists, then the dialog uses the first path there and if it doesn't, it uses the default data directory.

 

 

This gives you at least two viable options to try:

 

  1. If you look at the code for the default dir VI, you will see that it calls a property and if you look at the help for that, you can see that you can configure that property, including with a symbolic path, which might do what you want.
  2. If that doesn't work, you can try to set the INI token. The code shown here uses a read key VI and you should be able to use the equivalent write key VI from the same place.
    I think the main issues would be how to know which value to write there and when to do it. For the first, I suspect that calling the Get System Directory VI will get you what you need. For the second, it is possible to run a VI automatically when LV runs by calling it lv_init.vi, setting it to run when opened and saving it in <vi.lib>.

___________________
Try to take over the world!
Message 2 of 3
(606 Views)

Thank you very much, I don't really know much about Labview so I went with your second recommendation and modified the Labview.ini file located in C:\Program Files\National Instruments\LabVIEW 2023. Included in this ini is the attribute NewProjectSpecPagePath which was set to the first user's home directory. By deleting NewProjectSpecPagePath Labview defaults to the default data directory. This resolves our issue, thank you again for your help.

0 Kudos
Message 3 of 3
(556 Views)