Jump to content

Recommended Posts

Posted

Hello. I need to know which platform has my operating system: 32 or 64 bits. How I can know?

Regards.

Posted

You want a lisp program to tell you whether your computer and/or software is 32-bit or 64-bit?

Posted

You can pull my 64Bit-p function from this old post, and the wrapping function can offer you an example of usage:

 

 

 

[color=black]
[/color](defun c:MdiTab  (/ 64Bit-p)
   ;; © RenderMan, 2011
   (vl-load-com)
 
   [color="blue"](defun 64Bit-p ()
   [color="green"];; © RenderMan, 2011
   ;; Returns T if version is 64-Bit
   ;; Example: (64bit-p)[/color]
   (if (vl-string-search "64" (getenv "PROCESSOR_ARCHITECTURE"))
     T
     nil))[/color]
 
   ((lambda (key sdi / mditab flag)
      (if (and
            sdi
            (setq mditab
                   (cond
                     ((vl-string-search "17" key)                        ; 2007, 2008, 2009
                      (if (64Bit-p)
                        "mditab17x64.arx"
                        "mditab17.arx"))
                     ((vl-string-search "18" key)                        ; 2010, 2011, 2012
                      (if (64Bit-p)
                        "mditab18x64.arx"
                        "mditab18.arx"))))
            (setq flag (findfile mditab))
            (not (vl-position mditab (arx))))
        (and (arxload mditab) (princ "\rMDITAB: LOADED "))
        (cond
          (flag (and (arxunload mditab) (princ "\rMDITAB: UNLOADED ")))
          (mditabs
           (prompt (strcat "\n** \"" mditab "\" cannot be found ** ")))
          (sdi (prompt "\n** This AutoCAD version not supported ** "))
          ((prompt "\n** Command not allowed in SDI mode ** ")))))
     (vlax-product-key)
     (= 0 (getvar 'sdi)))
   (princ))

Posted
Hello. I need to know which platform has my operating system: 32 or 64 bits. How I can know?

 

I use:

(getenv "PROCESSOR_ARCHITECTURE")

 

So to test for 64-bit:

(defun 64bit-p ( ) (vl-string-search "64" (getenv "PROCESSOR_ARCHITECTURE")))

Posted

You can also use Windows own "run" function and type msinfo32.exe. At the screen that comes up next you can tell at a glance if your system is 32-bit or 64-bit.

 

MSinfo32.PNG

Posted

(defun 64bit-p ( ) (vl-string-search "64" (getenv "PROCESSOR_ARCHITECTURE")))

 

I 'spose that the If statement in my old offering above is a bit redundant. :rofl:

Posted
I 'spose that the If statement in my old offering above is a bit redundant. :rofl:

 

yup. ;) ....

Posted

O.K. Thank you very much to all. It is great.

Regards.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...