Anders Björk Posted November 21, 2006 Report Share Posted November 21, 2006 Dear all Is it possible to call a vi with options like, you would do with dos commands "dir h:\" then similar would be "dir.vi h:\" in a windows short-cut? If it is possible how do I get the option data? Essentially I want to call vi with a specific ini-fil. Quote Link to comment
LAVA 1.0 Content Posted November 21, 2006 Report Share Posted November 21, 2006 Dear allIs it possible to call a vi with options like, you would do with dos commands "dir h:\" then similar would be "dir.vi h:\" in a windows short-cut? If it is possible how do I get the option data? Essentially I want to call vi with a specific ini-fil. Do you mean that you would compile a VI into an exe? Or do you mean you first open LabVIEW and then run a VI inside LabVIEW? Or do you mean you do not compile VI into a binary but you would like to open LabVIEW and get it automatically to run a VI with some command line args. Command line arguments can be read using property node for Application class. Application class has a propety called Application -> Comman Line Arguments. -jimi- Quote Link to comment
Anders Björk Posted November 21, 2006 Author Report Share Posted November 21, 2006 Do you mean that you would compile a VI into an exe? Or do you mean you first open LabVIEW and then run a VI inside LabVIEW? Or do you mean you do not compile VI into a binary but you would like to open LabVIEW and get it automatically to run a VI with some command line args. Command line arguments can be read using property node for Application class. Application class has a propety called Application -> Comman Line Arguments. -jimi- I mean do not compile VI into a binary but you would like to open LabVIEW and get it automatically to run a VI with some command line args. Quote Link to comment
LAVA 1.0 Content Posted November 21, 2006 Report Share Posted November 21, 2006 I mean do not compile VI into a binary but you would like to open LabVIEW and get it automatically to run a VI with some command line args. Checking LabVIEW help is always a good point to start with... Application:Command Line Arguments Property Property of Application. Returns an array of user-defined command-line arguments passed when LabVIEW launched. User-defined arguments start after two hyphens (--) surrounded by spaces in the command line. The first string in the array is the name of the executable launched. This property does not return the name of the VI launched or the LLB that contains the VI. If a user-defined command-line argument contains double quotation marks ("), this property returns the argument without the quotation marks. If you use this property in a stand-alone application, you can pass all arguments as user-defined arguments so you do not need to enter the two hyphens before user-defined arguments in the command line. This property is similar to the Pass all command line arguments to application option on the Advanced page of the Application Properties dialog box. Example Remarks The following table lists the characteristics of this property. Remote access disallowed No Available in Run-Time Engine and Real-Time Operating System Yes (Read Only) Permissions Read Only Example Refer to the CommandLine VI in the labview\examples\viserver\cmdline.llb for an example of using the Application:Command Line Arguments property. Open example Browse related examples Quote Link to comment
Anders Björk Posted November 21, 2006 Author Report Share Posted November 21, 2006 Checking LabVIEW help is always a good point to start with... Thank you very much! It will help me alot! Should have checked the help better Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.