11-19-2017 01:36 AM
Hello,
I'm heavily modifying a scanning file for a laser and I've run into an issue. When I run the vi with File Dialog, I click okay to select a directory and it works wonderfully. If I attempt to replace this with a string containing the path name, it doesn't pass on the filename properly. I'm not quite sure why. I guess two questions.
1) Anyone have any ideas why this might be?
2) What is the actual output from the File Dialog node?
Thanks!
11-19-2017 01:52 AM
Please attach the actual VI, especially the one that does not work (i.e. with the string input, not the file dialog).
Is the string formed correctly? proper delimiters, etc.
Is the string control set to "limit to single line"?
Who wrote the subVIs? What's in them?
Why are you converting the path to a string?
11-19-2017 04:16 AM
LiquidPhD wrote: If I attempt to replace this with a string containing the path name, it doesn't pass on the filename properly.
My recommendation is to change that subVI to accept a Path data type instead of a string. Then you know that the path is formatted correctly.
11-19-2017 10:48 AM
Path-to-string should really only be used for either string formatting or for cases where external code requires a string (e.g. "system exec"). If you don't want to modify the subVI, you can still use a path control and convert to to a string before the subVI to ensure that the syntax is correct.
Every time you use strings (for paths) instead of path datatype, the code is immediately platform specific and will not work on other OS types (mac, linux, etc.).