LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I start LabWindows/CVI from a command line and pass it the name of file to be edited?

I am writing a coding standard inspection tool in Microsoft Develper Studio C#. In certain cases I want to instantiate and edit session of a CVI C source file. I need to know how to start LabWindows/CVI from the command line and pass an argument that is the file name to be edited. I have not found any discussion of starting LabWindows/CVI from a command line, nor in various reference manuals I have searched.

 

I know how to start something from the command line.

 

I know how to do what is required in C#. For example with NotePad.exe the following works:

Process.Start( "notepad.exe", "\"" + strFullPathname + "\"" );

 I don't have information on the LabWindows CVI command line.

 

I appreciate any useful response that may be offered. 

0 Kudos
Message 1 of 7
(4,636 Views)

may be this helps: http://zone.ni.com/devzone/cda/epd/p/id/785

 

oops, afte reading your post the second time I realized that this was nto the answer... sorry

 

Message Edited by Wolfgang on 06-16-2010 03:05 PM
0 Kudos
Message 2 of 7
(4,634 Views)

OK, I'll try again: I have just tried to start CVI with a certain project from the command line, and it works! My example:

 

"C:\Program Files\National Instruments\CVI2009\cvi.exe" "C:\Documents and Settings\Wolfgang\My Documents\Fit\Fit.cws"

0 Kudos
Message 3 of 7
(4,629 Views)
Thanks Wolfgang. I suspected it to be very much like what you have purported. I am currently working from home. I will try your solution once I arrive at work. I was not sure of the exe file name, so it has definitely cleared that up. The next question is will it open just a source file instead of a whole project. I'll let you know later today. Allyn
0 Kudos
Message 4 of 7
(4,626 Views)

The next question is will it open just a source file instead of a whole project

 

It opens the complete project, with the specified file type (uir, h, c) being the top most tab.

0 Kudos
Message 5 of 7
(4,622 Views)

For my situation the following C# code does the job:

 

    Process.Start(

       @"c:\Program Files\National Instruments\CVI71\cvi.exe",

       @"c:\temp\experiment.c" );

 

The file must already exist.

0 Kudos
Message 6 of 7
(4,609 Views)
well, actually it depends on the history: if the last time CVI was open, it contained three files, it will re-open these three files; hence in order to have only one tab/file opened one needs to close all the files before closing CVI.
0 Kudos
Message 7 of 7
(4,604 Views)