08-14-2023 11:54 AM
In LabVIEW 2023 Q3 (released version), you can enable a new behavior of File»Open in the LabVIEW editor.
To enable this feature, add this token to your preferences file (e.g., LabVIEW.ini):
FeatureToggle.Editor.OpenUsesDocDirectory=true
When editing VIs and other files in LabVIEW, the menu command File»Open will open the file dialog initially in the same directory as the current document. This behavior can streamline editing workflows where you are editing related files that are located in the same location on disk.
This feature will not affect the run-time behavior of the File Dialog or the Browse button behavior of Path controls.
Known Issue
The File»Open menu command (and related keyboard shortcut) from the Getting Started Window will erroneously open the file dialog initially in the location of the source code for the Getting Started Window.
Workaround: use the Open Existing button instead of the menu command.
08-14-2023 12:02 PM
Can you remind me how the old behavior was (i.e. if the option is set to false)?
@Christina_R wrote:
FeatureToggle.Editor.OpenUsesDocDirectory=true
When editing VIs and other files in LabVIEW, the menu command File»Open will open the file dialog initially in the same directory as the current document. This behavior can streamline editing workflows where you are editing related files that are located in the same location on disk.
Just to clarify, you are describing the behavior if the option is true, right?
08-15-2023 09:10 AM
@altenbach wrote:
Can you remind me how the old behavior was (i.e. if the option is set to false)?
If you do not set the token (or set it to false), then File»Open defaults to the disk location from which you last opened a file.
This can be very annoying when you open a one-off file from an unusual location (e.g., you want to look at a VI in Downloads) and then go back to editing your VIs. Rather than re-navigating to their working directory, some people will open the Properties dialog for an already-open file (that they know is near the one they want) and copy the path from Location to paste into the File dialog.
08-15-2023 09:58 AM - edited 08-15-2023 10:00 AM
Thanks. Yes, I run into this problem before, especially when doing forum stuff in the middle of my work. I made it a habit to look at the "Files" view in the project to ensure things are not outside the expected hierarchy before saving. 😄
I guess this does not help when "saving", but is still nice. 😄
08-15-2023 01:23 PM
@Christina_R wrote:
This can be very annoying when you open a one-off file from an unusual location (e.g., you want to look at a VI in Downloads) and then go back to editing your VIs. Rather than re-navigating to their working directory, some people will open the Properties dialog for an already-open file (that they know is near the one they want) and copy the path from Location to paste into the File dialog.
I use QuickDrop CTRL+E to open an explorer window where the VI is, or a CTRL+Shift+E to copy the VI path to the clipboard. Here is the QuickDrop posted online.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord