Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
*Expert Elite*
3,546 Posts
535 Kudos
Registered: ‎12-17-2004
Post 11 of 18

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
1,464 Posts
277 Kudos
Registered: ‎04-09-2008
Post 12 of 18

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*
3,546 Posts
535 Kudos
Registered: ‎12-17-2004
Post 13 of 18

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
1,464 Posts
277 Kudos
Registered: ‎04-09-2008
Post 14 of 18

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*
3,546 Posts
535 Kudos
Registered: ‎12-17-2004
Post 15 of 18

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
265 Posts
9 Kudos
Registered: ‎11-05-2008
Post 16 of 18

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
738 Posts
100 Kudos
Registered: ‎08-06-2002
Post 17 of 18

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
1,464 Posts
277 Kudos
Registered: ‎04-09-2008
Post 18 of 18

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