If you want this to work fast and efficient and with a reduced likelyhood of errors it's best to provide an association list of Color.layers.
Can you complete this list ??
(setq Color_Alias_List
(list
(cons 1 "LayerWithColor1")
(cons 2 "LayerWithColor2")
;; etc etc etc
)
)
BUT ..
do you happen to have the same color for Layers with differing LineTypes ?? ... if so you'll need a 3 part List
Something Like
(setq Color_Alias_List
(list
(list 1 "CONTINUOUS" "LayerWithColor1")
(list 1 "HIDDEN" "LayerWithColor1H")
(list 2 "CONTINUOUS" "LayerWithColor2")
;; etc etc etc
)
)
I'll wait to hear from you ..
I have not yet dived in to this shark pool fully so I did not notice the problem of having the same color but a different linetype - hence different layer.
I've attached the layer lists that they've provided us - the upside is that we are steel building manufacturers and hence would be able to get away by just using steel beam & sheeting anchor bolt etc.
to create the layers in the first place ill be using this lisp snippet:
(defun c:lay_man (/ linelist lin lay_tbl lay_list vlay)
(vl-load-com)
;Line Load Module
(setq linelist '(("Center" . "acadiso.lin")
("Hidden" . "acadiso.lin"))
)
(foreach lin linelist
(or (tblsearch "LTYPE" (car lin))
(command "._-linetype" "_Load" (car lin) (cdr lin) "")
)
)
(princ)
(setq lay_tbl (vla-get-layers (vla-get-activedocument (vlax-get-acad-object)))
lay_list '(("S-BEAM-STEL" 4 "Continuous" 2)
("S-ANNO-TEXT" 131 "Continuous" 1)
("S-ANNO-TABL" 2 "Continuous" 1)
("S-ANNO-NOTE" 71 "Continuous" 1)
("S-ANNO-MARK" 52 "Continuous" 2)
("S-GRID" 10 "CENTER" 0)
)
)
(foreach n lay_list
(if (setq vlay (vla-add lay_tbl (car n)))
(progn
(vla-put-color vlay (cadr n))
(vla-put-linetype vlay (caddr n))
;(vla-put-LineWeight vlay (nth 3 n)) ;have to confirm what is meant by the values on clinet layer list for the linetypes
)
)
)
) ; end lay_man - using Visual Lisp Code
Thanks a bunch for helping me with this