Wat goes wrong

Discussion of Common Lisp
Post Reply
EzDoesIt
Posts: 1
Joined: Fri Oct 03, 2014 4:33 am

Wat goes wrong

Post by EzDoesIt » Fri Oct 03, 2014 4:37 am

If got this code and somehow it won't load the right profile if it is ACAD version 20.0
Can anybody help please

Code: Select all

(vl-load-com)
(defun c:pro (/ cpr)
  (if (= (getvar "cprofile") "AutoCAD Structural Detailing")
    (setq cpr (strcase lnaam))

  )
  (if (= cpr nil)

		(if (= (car (getvar "acadver") "20.0s"))
			(setq cpr (strcase (strcat lnaam "_2015")))
		)
  		(if (/= (getvar "acadver") "20.0s (LMS Tech)")
			(setq cpr (strcase lnaam))
		)

  )
  (vla-put-ActiveProfile
    (vla-get-Profiles
      (vla-get-Preferences (vlax-get-acad-object))
    )
    cpr
  )
) ;_defun

edgar-rft
Posts: 226
Joined: Fri Aug 06, 2010 6:34 am
Location: Germany

Re: Wat goes wrong

Post by edgar-rft » Sat Oct 04, 2014 6:26 am

This section of the forum is about the programming language Common Lisp. Please ask AutoLisp questions in the Other Dialects section. Nearly nobody here has AutoCAD.

Post Reply