This is a read-only archive of lispforum.com. The forum was locked to new users and posts and is preserved here as static HTML from a database snapshot taken on 2019-09-07.

Wat goes wrong

2 posts · 3127 views

If got this code and somehow it won't load the right profile if it is ACAD version 20.0
Can anybody help please
(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