Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
*Expert Elite*
hmsilva
Posts: 2,861
Registered: ‎12-17-2004
Message 11 of 18 (229 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,417
Registered: ‎04-09-2008
Message 12 of 18 (215 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: 2,861
Registered: ‎12-17-2004
Message 13 of 18 (202 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,417
Registered: ‎04-09-2008
Message 14 of 18 (199 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: 2,861
Registered: ‎12-17-2004
Message 15 of 18 (192 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 (170 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: 635
Registered: ‎08-06-2002
Message 17 of 18 (165 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,417
Registered: ‎04-09-2008
Message 18 of 18 (159 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

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.