Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
*Expert Elite*
hmsilva
Posts: 3,198
Registered: ‎12-17-2004
Message 11 of 18 (231 Views)

Re: Windows is 32 or 64?

02-17-2013 02:21 PM in reply to: aqdam1978

Hi Abbas,

glad you got a solution

 

Henrique

Moderator
Alexander.Rivilis
Posts: 1,449
Registered: ‎04-09-2008
Message 12 of 18 (217 Views)

Re: Windows is 32 or 64?

02-17-2013 10:37 PM in reply to: hmsilva

What about many years known function:

(defun is64 ()
 (vl-load-com)
 (> (strlen (vl-prin1-to-string (vlax-get-acad-object))) 40)
) 

P.S.: Version of Windows (i.e.. x86 or x64) and version of AutoCAD can be different. For example AutoCAD 2007 x86 can be installed and work on Windows x64 (XP/Vista/Win7). Version of arx-files dependent of AutoCAD version and not of Windows version.


Пожалуйста не забывайте про Утвердить в качестве решения! Утвердить в качестве решения и Give Kudos!Баллы
Please remember to Accept Solution! Accept as Solution and Give Kudos!Kudos

*Expert Elite*
hmsilva
Posts: 3,198
Registered: ‎12-17-2004
Message 13 of 18 (204 Views)

Re: Windows is 32 or 64?

02-18-2013 01:15 AM in reply to: Alexander.Rivilis

Alexander.Rivilis wrote:
What about many years known function:
...

Alexander. thank you, "many years known function"
but I did not know ...

 

Henrique

Moderator
Alexander.Rivilis
Posts: 1,449
Registered: ‎04-09-2008
Message 14 of 18 (201 Views)

Re: Windows is 32 or 64?

02-18-2013 01:21 AM in reply to: hmsilva

Alexander. thank you, "many years known function"

but I did not know ...


This is because you do not use Search. :smileywink:


Пожалуйста не забывайте про Утвердить в качестве решения! Утвердить в качестве решения и Give Kudos!Баллы
Please remember to Accept Solution! Accept as Solution and Give Kudos!Kudos

*Expert Elite*
hmsilva
Posts: 3,198
Registered: ‎12-17-2004
Message 15 of 18 (194 Views)

Re: Windows is 32 or 64?

02-18-2013 01:33 AM in reply to: Alexander.Rivilis

Alexander.Rivilis wrote:
This is because you do not use Search.
...

not correct, I often use "search" is a very good tool and is my first choice... :smileywink:

Henrique

Mentor
aqdam1978
Posts: 265
Registered: ‎11-05-2008
Message 16 of 18 (172 Views)

Re: Windows is 32 or 64?

02-18-2013 05:26 AM in reply to: Alexander.Rivilis

what is you opinion about reading from registry?

 

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_ARCHITECTURE

 

Distinguished Mentor
owenwengerd
Posts: 676
Registered: ‎08-06-2002
Message 17 of 18 (167 Views)

Re: Windows is 32 or 64?

02-18-2013 05:57 AM in reply to: aqdam1978

Inspecting (getvar "PLATFORM") will not work, as you have found. You must use (getenv "PROCESSOR_ARCHITECTURE") for inspecting the architecture of the running AutoCAD. See ISX64.LSP here:

http://www.manusoft.com/software/freebies/lisp.html

--
Owen Wengerd
ManuSoft
Moderator
Alexander.Rivilis
Posts: 1,449
Registered: ‎04-09-2008
Message 18 of 18 (161 Views)

Re: Windows is 32 or 64?

02-18-2013 06:03 AM in reply to: aqdam1978

aqdam1978 wrote:

what is you opinion about reading from registry?

 

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_ARCHITECTURE

 


PROCESSOR_ARCHITECTURE allow check Windows architecture (x86/x64) but not a AutoCAD architecture. As I wrote above this is not the same thing.


Пожалуйста не забывайте про Утвердить в качестве решения! Утвердить в качестве решения и Give Kudos!Баллы
Please remember to Accept Solution! Accept as Solution and Give Kudos!Kudos

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!