;; | ---------------------------------------------------------------------------- ;; | LA_IsLayerStateDefined ;; | ---------------------------------------------------------------------------- ;; | Function : Checks if a given layer state is defined ;; | Arguments: ;; | as specified ;; | Action : -as specified above- ;; | Updated : February 13, 2004 ;; | e-mail : rakesh.rao@4d-technologies.com ;; | Web : www.4d-technologies.com ;; | ---------------------------------------------------------------------------- (defun LA_IsLayerStateDefined ( Name / x Dicts Found Lays States ) (setq Name (strcase Name) lays (vla-get-layers (vla-get-activedocument (vlax-get-acad-object))) States nil Found nil ) (if (vla-get-HasExtensionDictionary lays) (progn (setq dicts (vla-getextensiondictionary lays)) (vlax-for x dicts (if (= (vla-get-name x) "ACAD_LAYERSTATES") (setq states x) ) ) (if States (progn (vlax-for x States (if (= (strcase (vla-get-name x)) Name) (setq Found T) ) ) )) )) Found )