06-16-2010 07:47 AM
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.
06-16-2010 08:00 AM - edited 06-16-2010 08:05 AM
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
06-16-2010 08:26 AM
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"
06-16-2010 08:35 AM
06-16-2010 08:48 AM
It opens the complete project, with the specified file type (uir, h, c) being the top most tab.
06-16-2010 10:58 AM
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.
06-16-2010 11:14 AM