• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Visual LISP, AutoLISP and General Customization

    Reply
    *Expert Elite*
    Posts: 1,212
    Registered: ‎12-17-2004

    Re: Windows is 32 or 64?

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

    Hi Abbas,

    glad you got a solution

     

    Henrique

    Please use plain text.
    Moderator
    Alexander.Rivilis
    Posts: 1,168
    Registered: ‎04-09-2008

    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

    Please use plain text.
    *Expert Elite*
    Posts: 1,212
    Registered: ‎12-17-2004

    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

    Please use plain text.
    Moderator
    Alexander.Rivilis
    Posts: 1,168
    Registered: ‎04-09-2008

    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

    Please use plain text.
    *Expert Elite*
    Posts: 1,212
    Registered: ‎12-17-2004

    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

    Please use plain text.
    Distinguished Contributor
    Posts: 145
    Registered: ‎11-05-2008

    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

     

    Please use plain text.
    Mentor
    Posts: 239
    Registered: ‎08-06-2002

    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
    Please use plain text.
    Moderator
    Alexander.Rivilis
    Posts: 1,168
    Registered: ‎04-09-2008

    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

    Please use plain text.