Can i use HSL color codes?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
this lisp currently changes one layers color to 8. is there a way to make it so instead of reading color 8 from the index colors, it can use a true color and I can just input the HSL numbers instead
(vl-load-com)
(defun c:colorize (/ *error* c_doc c_lyrs)
; localised error function
(defun *error* ( msg )
(if (and c_doc (= 8 (logand 8 (getvar 'UNDOCTL)))) (vla-endundomark c_doc))
(if (not (wcmatch (strcase msg) "*BREAK*,*CANCEL*,*EXIT*")) (princ (strcat "\nOops an Error : " msg " occurred.")))
(princ)
);_end_*error*_defun
;initial setups here
(setq c_doc (vla-get-ActiveDocument (vlax-get-acad-object))
c_lyrs (vla-get-layers c_doc)
);end_setq
;start of altering drawing
(if (and c_doc (= 8 (logand 8 (getvar 'UNDOCTL)))) (vla-endundomark c_doc))
(vla-startundomark c_doc)
;color changing
(command "_.layer" "_color" 8 "BEL-CABLE" "")
(if (and c_doc (= 8 (logand 8 (getvar 'UNDOCTL)))) (vla-endundomark c_doc))
(princ)
);end_defun