LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to load files from an existing program (do not have source code)

I need to find out how to load files (ie: data files) into an existing CVI program that I do not have the source code for.  This CIV program has on the tool bar a FILE tab to which you can manually load various data files.  I am trying to creating a new program (that will use the existing CVI program) that by choosing the data file, it will load the main CVI program along with the associated data file with it.  I know there is a way, but I am unsure of it.  I think that I will have to create a DLL of some sort.  Any help will be great.
0 Kudos
Message 1 of 5
(3,455 Views)
Hi Berto Futaba,

If I understand you correctly, you would like to have a CVI program pass a file path and open an additional CVI program (which you do not have the source code).  Is this correct?  I'm not sure of a method initially, but if you could give some more detail, I'd be happy to help!
Matt S
National Instruments
Applications Engineer
0 Kudos
Message 2 of 5
(3,412 Views)
Unless the existing CVI program was consciously developed with a way to pass an input file path programmatically (i.e. via a command line argument or a programmatic ActiveX or C interface), I don't think this will be possible. You will likely have to find some documentation or a developer for the program to consult with to find out if such a route exists. The only other way I can imagine would be to use the Windows SDK to try to send window events to the application in a way that mimics manually loading the data file from the FILE menu. I can't really be much help with that approach.

Mert A.
National Instruments
0 Kudos
Message 3 of 5
(3,409 Views)
A quick and not-so-dirty way to drive the 'slave' application may be to use any GUI-automation tool (AutoIt comes to mind)

Regards.
Nicolas
0 Kudos
Message 4 of 5
(3,392 Views)

Hi,

As Mert_A has previously mentioned, if the application was created to accept command line arguments such
as a filepath to a data file to be opened, then it's straight forward.

I would try "requesting help" from the application for the command line syntax, just in case the original developer
added this option.

For example try: application.exe /?

I'm sure there are few more help arguements/switches that might be tried, such as /help.

regards,

 

Gary.

 

0 Kudos
Message 5 of 5
(3,388 Views)