LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to get the computer name from mac os x system by labview

Does anyone know how to write a software to get the computer name from Mac OS X Lion system by labview? I really have no idea about it. It's appreciated someone can tell me. Thanks!

0 Kudos
Message 1 of 7
(3,142 Views)

Hi,
I don't know if it's the same than on PC, but with Windows version, this is trivial :

test23.png

 

Hope this will help you.

 

Best Regards,

V-F
0 Kudos
Message 2 of 7
(3,140 Views)

The Environment class apparently does not exist on the Mac. The snippet is broken and nothing like that appears in the menus.

 

It might be possible using Apple Events to query System Preferences >> Sharing >> Computer Name.  I think Lion changes System Preferences to a different name.

 

Lynn

0 Kudos
Message 3 of 7
(3,125 Views)

Hi,

 

How do you get the environment property? I cannot find it in my Labview version 2011.

0 Kudos
Message 4 of 7
(3,099 Views)

I cannot find it either.  Nor can I find any mention of it in the Help files.

 

Lynn

0 Kudos
Message 5 of 7
(3,090 Views)

Hi Everyone,

 

Here is the easiest way to get your computer name on OSX.

 

get_computer_name.png

 

That is the System Exec VI.

 

Regards,

Matt M.

Applications Engineer
National Instruments
Message 6 of 7
(3,037 Views)

Matt M.,

 

Thanks.

 

I suspected that there might be some way to use System Exec that way but did not know the commands.

 

That works on my iMac.  Apple apparently uses a strange ' (apostrophe) character because Johnson's iMac produces hex code display of three bytes for the apostrophe.  When I edited the name to something else and then typed in an apostrophe again from the keyboard it shows up as an apostrophe (hex 27).

 

Lynn

0 Kudos
Message 7 of 7
(3,027 Views)