(setq ent (car (entsel)))
(setq obj (vlax-ename->vla-object ent))
(setq col (acad_truecolordlg 256))
(vla-put-truecolor obj col)
One more question. If the user selects a non-standard colour in acad_truecolordlg i.e. in R,G,B format, then how to change the property of the entity to the user selected color ?
(defun c:test ( / col idx sel )
(if
(and
(setq sel (ssget "_:L"))
(setq col (acad_truecolordlg 1))
)
(repeat (setq idx (sslength sel))
(entmod (append (entget (ssname sel (setq idx (1- idx)))) col))
)
)
(princ)
)