+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Senior Member
    Discipline
    Construction
    wimal's Discipline Details
    Occupation
    cadoperator
    Discipline
    Construction
    Using
    AutoCAD 2016
    Join Date
    Oct 2011
    Location
    sri lanka
    Posts
    469

    Default code to find current cad version

    Registered forum members do not see this ad.

    Is there a code to find out current cad version or identification code ?

  2. #2
    Quantum Mechanic ReMark's Avatar
    Computer Details
    ReMark's Computer Details
    Operating System:
    Windows 7 Pro 64-bit
    Computer:
    Thinkmate
    Motherboard:
    Intel DX58SO2 LGA1366 X58
    CPU:
    Intel i7-960 Quad-core 3.20GHz 8MB cache
    RAM:
    12GB (3x4GB) PC3-106000 DDR3
    Graphics:
    nVidia Quadro K4200, 4GB GDDR5
    Primary Storage:
    150GB Velocipraptor 10,000 rpm
    Secondary Storage:
    none
    Monitor:
    Dell P24LLH - 24" wide screen LCD
    Discipline
    See details...
    ReMark's Discipline Details
    Occupation
    CAD Draftsman/Designer...chemical manufacturing.
    Discipline
    See details below.
    Details
    I work for a specialty chemical manufacturer. I do a little bit of everything from P&IDs to civil to architectural and structural.
    Using
    AutoCAD 2018
    Join Date
    Nov 2005
    Location
    Norwalk, CT USofA
    Posts
    46,833

    Default

    I'm pretty sure that question has been asked and answered here (possibly this year too). Try a search.
    "I have only come here seeking knowledge. Things they wouldn't teach me of in college." The Police

    Eat brains...gain more knowledge!

    I'm now a full member of the Society for the Promotion of Mediocrity in CAD. Standards? We don't need no stinkin' standards! Take whatever advice I offer and do the opposite.

  3. #3
    Senior Member GP_'s Avatar
    Using
    AutoCAD 2016
    Join Date
    Oct 2010
    Location
    Vercelli, Italy
    Posts
    307

    Default

    (getvar 'acadver)
    (atoi (substr (ver) 13))

  4. #4
    Luminous Being BlackBox's Avatar
    Computer Details
    BlackBox's Computer Details
    Operating System:
    Windows 8.1 Professional, Server 2012 R2 Datacenter
    Computer:
    Dell Precision T3600
    CPU:
    Hex-Core Intel Xeon 3.2Ghz
    RAM:
    32GB
    Graphics:
    3GB NVIDIA Quadro K4000
    Primary Storage:
    2 x 240GB Samsung EVO SSD (RAID 0)
    Secondary Storage:
    1TB Western Digital VelociRaptor 10K RPM
    Monitor:
    Dual 24" Dell Ultrasharp Widescreen Monitors
    Discipline
    Civil
    BlackBox's Discipline Details
    Occupation
    Senior Civil Designer
    Discipline
    Civil
    Details
    Public/Private Land Development, Transportation, and Utilities.
    Using
    Civil 3D 2016
    Join Date
    Nov 2009
    Posts
    5,282

    Default

    Depends on what you're attempting to identify; I've also used:

    Code:
    (vl-load-com)
    
    (if vlax-user-product-key                                               ; If 2013+
      (vlax-user-product-key)                                               ; Use new function
      (vlax-product-key)                                                    ; Use legacy function
    )
    "Potential has a shelf life." - Margaret Atwood
    AutoCAD, and Civil 3D Certified Professional | Autodesk Authorized Developer
    Sincpac C3D ~ Exchange Apps ~ Autoloader ~ AutoCAD Security

  5. #5
    Luminous Being BlackBox's Avatar
    Computer Details
    BlackBox's Computer Details
    Operating System:
    Windows 8.1 Professional, Server 2012 R2 Datacenter
    Computer:
    Dell Precision T3600
    CPU:
    Hex-Core Intel Xeon 3.2Ghz
    RAM:
    32GB
    Graphics:
    3GB NVIDIA Quadro K4000
    Primary Storage:
    2 x 240GB Samsung EVO SSD (RAID 0)
    Secondary Storage:
    1TB Western Digital VelociRaptor 10K RPM
    Monitor:
    Dual 24" Dell Ultrasharp Widescreen Monitors
    Discipline
    Civil
    BlackBox's Discipline Details
    Occupation
    Senior Civil Designer
    Discipline
    Civil
    Details
    Public/Private Land Development, Transportation, and Utilities.
    Using
    Civil 3D 2016
    Join Date
    Nov 2009
    Posts
    5,282

    Default

    ... And another one (read-only for LISP, write-enabled for .NET API):

    Code:
    (vl-load-com)
    
    (vla-get-caption (vlax-get-acad-object))
    "Potential has a shelf life." - Margaret Atwood
    AutoCAD, and Civil 3D Certified Professional | Autodesk Authorized Developer
    Sincpac C3D ~ Exchange Apps ~ Autoloader ~ AutoCAD Security

  6. #6
    Quantum Mechanic
    Using
    Civil 3D 2016
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    10,399

    Default

    Registered forum members do not see this ad.

    Some more examples

    Code:
    ;vercheck.lsp  version check for *aecc objects
    
    (defun ah:vercheck ( / vrsn appstr)
    (vl-load-com)
    (if ((lambda (vrsn)
            (cond
             ((vl-string-search "R17.2" vrsn) (setq appstr "6.0")) ;09
             ((vl-string-search "R18.0" vrsn) (setq appstr "7.0")) ;10
             ((vl-string-search "R18.1" vrsn) (setq appstr "8.0")) ;11
             ((vl-string-search "R18.2" vrsn) (setq appstr "9.0")) ;12 ?
             ((vl-string-search "R19.0" vrsn) (setq appstr "10.0")) ;13 
             ((vl-string-search "R19.1" vrsn)(setq appstr "11.0"));;2014
             ((vl-string-search "R20.0" vrsn)(setq appstr "12.0"));;2015
             ((alert "This version of C3D not supported!"))
            )
           )
           (vlax-product-key)
          )                         ; end if condition progn is true
          (progn
            (cond (*AeccDoc*)
              ((setq *AeccDoc*
                (vlax-get
                  (cond (*AeccApp*)
                    ((setq *AeccApp*
                      (vla-getinterfaceobject
                         (cond (*Acad*)
                         ((setq *Acad* (vlax-get-acad-object)))
                         )
                         (strcat "AeccXUiLand.AeccApplication." appstr)
                      )
                     )
                    )
                  )
                  'ActiveDocument
                )
               )
              )
            ) ; end main cond
          ) ; end progn
    ) ; end if vsrn
    )
    A man who never made mistakes never made anything

Similar Threads

  1. Replies: 1
    Last Post: 14th Aug 2014, 03:34 am
  2. Is there such a code? Convert version
    By highflybird in forum AutoLISP, Visual LISP & DCL
    Replies: 3
    Last Post: 20th Jan 2014, 04:51 pm
  3. Find current layer - system variable
    By wimal in forum AutoLISP, Visual LISP & DCL
    Replies: 6
    Last Post: 3rd Feb 2013, 08:52 pm
  4. How to find which menugroups exist in current work space?
    By Ahankhah in forum AutoLISP, Visual LISP & DCL
    Replies: 5
    Last Post: 27th Nov 2012, 01:44 pm
  5. Find & Replace in current layout only
    By clint0577 in forum AutoLISP, Visual LISP & DCL
    Replies: 3
    Last Post: 12th Nov 2012, 09:02 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts