Hi everyone
i'm Emmanuel and i've been writting (with a lot of help of this forum and all you guys) autolisp and vlisp for over a year and this is the first time i'm officially posting a question in here, so i'm quite excited
I'm currently working on in a little routine to filter layers with a specific name, in this case "WIRKFLÄCHE" (german for design area).
and i was using a ssget '((8. "*wirkf*")) but giving that i'm going to use another ssget to modified some objects later, i decided to use vlax-map-collection, and it works fine, but when i'm trying to use (if (wcmatch layername "*WIRKFLÄCHE")) it doesn't filter a thing
(defun c:layertest (/ acadDoc modelSpace theLayers dwgName layerList)
(vl-load-com)
(setq
acadDoc (vla-get-ActiveDocument (vlax-get-acad-object))
modelSpace (vla-get-ModelSpace acadDoc)
)
(setq theLayers (vla-get-layers acadDoc))
(setq layerList '())
(vlax-map-collection theLayers
'(lambda (theLayer)
(setq dwgName (vlax-get-property theLayer 'Name))
(if
(wcmatch dwgName "*WIRKFLÄCHE")
(progn
(setq layerList (append (list dwgName) layerList))
(setq layerList (reverse layerList))
);progn
);end IF
;;; (vlax-put-property theLayer "LayerOn" ':vlax-true)
;;;
;;; (vla-put-color thelayer 5)
);lambda
);vlax-map-collection
);defun
am i missing something in here?