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.
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.
03-24-2011 03:18 PM
I was trying to do this with a command line but I cant seem to get it to work. The filepath would be something like this \\Computer\Pictures\image.jpg
Or
Is there a way to open the file with the windows default program assocation?
Thanks,
Branson
LV 8.2
Solved! Go to Solution.
03-24-2011 03:36 PM
Use System Exec and use the path to the picture as your command line.
03-25-2011 06:25 AM - edited 03-25-2011 06:26 AM
I have been trying to use System Exec vi with no success. But, I did find out why it hasn't been working. If the path to the file has no spaces then it WORKS. If there is any spaces in the folder or file name, then it DOESN'T WORK.
C:\Sunset.jpg
C:\Copy of Sunset.jpg
How do i get the file paths with spaces in them to work?
-Branson
WinXP Pro SP3
LV 8.2
03-25-2011 07:48 AM
After some research, I found this article...
http://zone.ni.com/devzone/cda/epd/p/id/828
I modified the code a little to accept a path. Here is the result...
C:\Copy of Sunset.jpg -----> C:\COPYOF~1.JPG
Then I use this path and send it to the Systemexec.vi and my file opens with whatever the windows default application is previously set.
03-25-2011 09:21 AM
...but
\\Server\MY Database\Pictures\OGP Fixture Setup\zero setup.jpg
-----> \\Server\MY Database\Pictures\OGPFIX~1\ZEROSE~1.JPG
The conversion program didn't remove the space between "MY" and "Database"
Is there anything else to try?
-Branson
03-25-2011 09:54 AM
03-25-2011 10:21 AM
Double quotes around the path was part of the answer, Thanks to Darin.K
The other part was that I needed to prepend "cmd \c " to the string before passing it to Systemexec.vi.
cmd /c "\\Server\MY Database\Pictures\image.jpg" -----> Command Line input of Systemexec.vi
Now all my links are working!
Thanks again,
Branson