wimal Posted October 15, 2014 Share Posted October 15, 2014 Is there a code to find out current cad version or identification code ? Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 15, 2014 Share Posted October 15, 2014 I'm pretty sure that question has been asked and answered here (possibly this year too). Try a search. Quote Link to comment Share on other sites More sharing options...
GP_ Posted October 15, 2014 Share Posted October 15, 2014 (getvar 'acadver) (atoi (substr (ver) 13)) Quote Link to comment Share on other sites More sharing options...
BlackBox Posted October 15, 2014 Share Posted October 15, 2014 Depends on what you're attempting to identify; I've also used: (vl-load-com) (if vlax-user-product-key ; If 2013+ (vlax-user-product-key) ; Use new function (vlax-product-key) ; Use legacy function ) Quote Link to comment Share on other sites More sharing options...
BlackBox Posted October 15, 2014 Share Posted October 15, 2014 ... And another one (read-only for LISP, write-enabled for .NET API): (vl-load-com) (vla-get-caption (vlax-get-acad-object)) Quote Link to comment Share on other sites More sharing options...
BIGAL Posted October 16, 2014 Share Posted October 16, 2014 Some more examples ;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 ) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.