01-14-2015 05:07 PM
Hi - How do we set or change the default value for "File Path Control" (Control --> String & Path ---> File Path Control)?
I typed the default path into the control field on the front pannel and save the VI file. The value gone when I reopen the file.
01-14-2015 05:20 PM
Right click on the control, go to Data Operations>>Make Current Value Default
01-14-2015 05:44 PM
How do we set to NOT valid the path value?
01-14-2015 05:49 PM - edited 01-14-2015 05:50 PM
I would drop a Not A Path constant on the BD, right-click and Change to Control. The default value is now set for you.
If you use Modern controls you can click on the % glyph and choose Not A Path, but I use System controls so that is why I go the constant route (plus the auto default setting is nice)
01-15-2015 12:51 AM
By the way, I realize I never paid attention that there's a difference between Not a path and Empty path... Why?
01-15-2015 06:51 AM
@Jimmy.chretien wrote:
[...] difference between Not a path and Empty path... Why?
Not a Path is a specific value for the path (<Not a Path>).
Developers should use this to prevent situations in applications, where a user has to select a path before performing an action (e.g. saving a file). If the user skips the path selection, the application still has "Not a Path" and can prevent errors and tell the user to select the path (error handling!).
Norbert
01-15-2015 10:53 AM
If it returns empty path, the developer can easilly do the same error handling, I don't see the point....
01-15-2015 11:00 AM
@Jimmy.chretien wrote:
If it returns empty path, the developer can easilly do the same error handling, I don't see the point....
Not as easilly since an empty path returns F for the comparison
01-15-2015 11:04 AM
@Jimmy.chretien wrote:
If it returns empty path, the developer can easilly do the same error handling, I don't see the point....
The empty path on Mac/Linux is the root of the file system. When you write paths such as /path/path it is actually (empty)/path/path. The upshot is that the empty path is perfectly valid on those systems and not really a useful sentinel value. <Not A Path> is such a sentinel.
01-15-2015 11:23 AM