12-21-2009 04:00 PM
I would like to be able to associate a file type with my executable, and have a specific file load into my executable when that file is double clicked (similar to how Excel opens an xls file when that xls file is double clicked). Is there any way to do this in labview? The file is a TDMS file.
Thanks,
Rodrigo
12-21-2009 09:15 PM
12-22-2009 01:06 AM
12-22-2009 07:16 AM
And the mentioned event on the LabVIEW Wiki only worked in LabVIEW 8.2.
Please vote for this idea!
Ton
12-22-2009 09:01 AM
You should be able to do this with the application->app.arguments property.
This property gives you the command line arguments (like in c the args[] on the main function).
This returns a string array, when you use an open with or drag a doc into your build (check the pass command line arguments under the advanced builds options page) this property will return a string array, the second element is the path to the doccument. In the beginning of your processor/display exe check if this is a valid file and execute the code as desigend. A state machine architecture is nice fvor this, add a stat called check command line and if this is valid jump into your processing state, otherwise run your program as expected. You can retrofit any processing application with this approach. As for locking the associations, you can usually do this by giving your docs a unique extension (dont use an existing extension like .txt, .exe, .vi ...) Click open with, browse for your application, after select always use this application.
This has worked for me in the past.