Search the Community
Showing results for tags 'wcmatch'.
Herr_Manu posted a topic in AutoLISP, Visual LISP & DCLHi 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?
Manuel_Kunde posted a topic in AutoLISP, Visual LISP & DCLHi, I'm trying to query the variable "Weight" and if it has the content "50" I want to define a new variable: "Stamp" with the content "internal". Is WCMATCH the right command for this? (if (= wcmatch Weight "50") (progn (setq stamp "intern"))) (princ)
Manuel_Kunde posted a topic in AutoLISP, Visual LISP & DCLHi Guys, I have several layouts when drawing, which also have different names. I want to save in a Lisp all layouts that start with a specific name in a certain folder as PDF. I am new in lisp, but i have managed to write a lisp that selects the correct location for me. Unfortunately only all layouts are printed. (defun c:Dokument_Export () (command "-EXPORT" "PDF" "ALLE" (strcat (substr (getvar "DWGPREFIX") 1 70) "\\08_Auftragsbestätigung\\" (strcat (substr (getvar "DWGNAME") 1 8) "_Zeichnung") ) ) ) You have any idea? Thanks in advance.
Hi all, is there a way to define a property filter for lyers to exclude some patterns? (Assume you want to hide layers starting with "3D ", which the matching pattern in wcmatch function is "~3D *"...) Any help is appreciated.