From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

default path

What determines the starting path in a path control with an empty start path? 

 

To illustrate the question, I created a path control with an empty start path. I then displayed every path constant I could think of. None of them correspond to the start path for the path control on my machine. 

 

I realize the simplest thing would be to just manually set the start path for all my path controls. But I inherited a code that has lots of path controls, all of which rely on finding data in a default directory. I'd prefer to change them all at once, if possible. 

 

Thanks.

 

 

0 Kudos
Message 1 of 9
(3,032 Views)

An empty path in a path control appears as an empty string on Windows and Mac OS X and as a slash (/) on Linux. Usually, I would use an empty path to prompt the user to specify a path.  When an empty path is wired to a file input/output function, it refers to the following, depending on which operating system you are using:

 

Windows -- the list of drives mapped to the computer

Mac OS X -- the mounted volumes

Linux -- the root directory

 

 

 

The Temporary, Default, and Default Data Directories can be set in the options dialog box.  Select Tools»Options and select Paths from the Category list.  Select the directory you would like to configure from the Path Chooser and browse to the desired path.

0 Kudos
Message 2 of 9
(2,973 Views)

I believe you are looking for what Windows calls the "Current Working Directory". See this post for how to set:

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

Charles Chickering
Architecture is art with rules.

...and the rules are more like guidelines
0 Kudos
Message 3 of 9
(2,971 Views)

Charles,

 

The Current Directory.VI that you recommended seems not to have any effect. .

 

See the attached VI. In it, I pasted in Set Current Directory.VI that you recommended.  I then filled the Set Directory path with some arbitrary path. Finally, I browsed inside the bottom  path control. The starting directory was different from the Current Directory. 

 

Something else controls the start path in a path control with an empty start path property. 

 

0 Kudos
Message 4 of 9
(2,948 Views)

efarr,

 

From what I gather, I believe you are looking for the Path Chooser in the Options dialog box.  I was able to use this tool to change the folder that opens with the Browse button on the Path Control in your VI.  Refer to my earlier post for navigation to the Path Chooser.

 

If this is not what you are looking for, maybe you can clarify as to what your objective is in setting a default directory.

 

 

0 Kudos
Message 5 of 9
(2,925 Views)

I also have the same problem. I had tried a lot. But nothing works

0 Kudos
Message 6 of 9
(2,497 Views)

Hi neech,

 

what exactly is your problem and what have you tried?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 9
(2,493 Views)

Hi GerdW,

I want to transfer the "Simulate Signal" of Triangle to Excel file using "Write To Measurement File". I have been trying to change the path of "Default Data Directory" to other folder. Below are my vi file. Is there anything missing in my code?Please help. TQ

0 Kudos
Message 8 of 9
(2,488 Views)

Hi neech,

 

I have been trying to change the path of "Default Data Directory" to other folder.

Use a different path constant instead!

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 9
(2,482 Views)