Visual LISP, AutoLISP and General Customization

Reply
*Expert Elite*
Posts: 2,381
Registered: ‎12-17-2004
Message 11 of 18 (218 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,346
Registered: ‎04-09-2008
Message 12 of 18 (204 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*
Posts: 2,381
Registered: ‎12-17-2004
Message 13 of 18 (191 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,346
Registered: ‎04-09-2008
Message 14 of 18 (188 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*
Posts: 2,381
Registered: ‎12-17-2004
Message 15 of 18 (181 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
Posts: 253
Registered: ‎11-05-2008
Message 16 of 18 (159 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

 

Valued Mentor
owenwengerd
Posts: 498
Registered: ‎08-06-2002
Message 17 of 18 (154 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,346
Registered: ‎04-09-2008
Message 18 of 18 (148 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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community