hmsilva, Thank you!
like this?
- (defun c:[color="red"]test[/color] () (if (>= (atof (getvar 'ACADVER)) 16.1);; "16.1" AutoCAD 2005 (progn ;;;;;;;;;;;;;;;;;;;;;;;;My routine is start ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;(defun c:[color="red"]test[/color](/ *error* dlg p a i l 1p sc e pl h gr rot r)................ ) (princ));;;;;;;;;;;;;;;;My routine is over;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (Alert "You have the correct CAD version!!!");; just for demo );; progn (Alert "Need CAD2005 or later") );; if);; test
1.Command must be the same? your routine command is "test", my routine command must "test" too,
2. if version is right , show "you have the correct cad version" ,this can omit.
I mean if version is low ,show "Need Cad2005 or later" ,if is right , not prompt,Direct calling program.
Thanks! |