LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"xterm" commands Mac

Solved!
Go to solution

Hello

 

Using LabView 2009 on Mac OSX:

On my VI, I would like to place a button that when pushed will open a PDF of the instrument's instruction manual. I found what I believe to be a solution for a Windows operating system on this thread below...

 

http://forums.ni.com/t5/LabVIEW/system-exec-vi-wont-take-multiple-cmd-line-options/m-p/1120009#M4944...

 

But I cannot get it to work on Mac OSX (not surprising). I cannot find a Mac equivalent. Using X-Terminal, the command is simply

 

"open InstructionManual.pdf" when in the correct directory.

 

Can anyone please point me to a subroutine that will either allow me to use an X-Terminal command or a Mac OSX system command that will open up a PDF?

 

Thanks very much.

0 Kudos
Message 1 of 6
(3,687 Views)
Solution
Accepted by topic author CodeMunkee

I think you can do it with the System Exec.vi (Connectivity palette) although I have not done that in quite a while so I do not recall the exact format.  The image below shows how to use Apple Events to open a PDF.

 

Lynn

Apple Event Command.png

Message 2 of 6
(3,668 Views)

Hey CodeMunkee,

 

You do have the option to open the PDF as an ActiveX control.  Please see the community example Open PDF in LabVIEW.

 

Lynn

National Instruments
Senior Systems Engineer
0 Kudos
Message 3 of 6
(3,651 Views)

Lynn,

 

ActiveX is not available for the Macintosh, which CodeMunkee is using.

 

Lynn

0 Kudos
Message 4 of 6
(3,646 Views)

Thank you!

 

For anyone else with a similar issue: in LabView 2009, go to Data Communications>>Protocol>>AppleEvent>>AEFinderOpen

 

works like a charm. specify folder, then file.

 

One final question... for mass distribution I plan to have the PDF in the same folder as the VI (which will be a *.app). What is the right way to specify "current folder"? I thought I could just do this

 

.:

 

as the current file (that's a period for the current folder, then a colon) and then indicate InstructionManual.pdf as the file, but it didn't work. What am I doing wrong?

 

Thanks a ton.

0 Kudos
Message 5 of 6
(3,633 Views)

Hey CodeMunkee,

 

You could try using the Current VI's Path Function with the Path to String Function.

 

Lynn

National Instruments
Senior Systems Engineer
0 Kudos
Message 6 of 6
(3,612 Views)