;; (dumpallproperties (car (entsel)))

;; SetProfileDescription
;; Take the Profile name from a BIM profile entity and use it to create its description

(defun C:SetProfileDescription ( / beam profile profile_list desc)
	(setq beam (car (entsel "\nSelect BIM profile: ")))
	(cond
		(beam
			(setq profile (getpropertyvalue  beam  "Profile~BIM")) ; retrieve the profile value
			(cond
				(profile
					(setq profile_list (vle-string-split " " profile)) ; split the profile value out to a list
					(setq desc (apply 'STRCAT (cdr profile_list))) ; form the description by removing the first item, then stringing the remainder together
					(setq err (vl-catch-all-apply 'setpropertyvalue  (list beam "Description~BIM" desc))) ; apply the description to the beam
					(if (vl-catch-all-error-p err) ; if there was an error
						(princ (vl-catch-all-error-message err)) ; report the error
						(princ (strcat "\nDescription set to: " desc)) ; other wise confirm
					)							
				)
				(T (princ "\nNo profile data found"))
			)
		)
		(T (princ "\nNothing selected"))

	)
	(prin1)
)