Message 1 of 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone,
I am trying to figure how to select layers via a wildcard. In the code below I am selecting all the layers in a specific XREF and changing the plotstyle. There are specific layers that I would like to exclude. I have about 10 easement layers and do not want to have to list each layer; they all start with V-EASE, so I would like to say, anything that starts with V-EASE, exclude. The code below with the * does not work, not sure how to do that.
Also If anyone has a better way to do what I am doing overall, I am all ears.
(defun c:Test5 (/ ActDoc)
(vlax-for Lay
;;; Get layers from active document
(vla-get-Layers
(setq ActDoc (vla-get-ActiveDocument (vlax-get-Acad-Object))
) ;_ end of setq
) ;_ end of vla-get
;;; Plotstyle control for C-BASE
(if
(and (= (vl-string-search "C-BASE|" (vla-get-Name Lay)))
(not (member (strcase (vla-get-name Lay)) '("C-BASE|V-PROP-SBACK-TEXT"
"C-BASE|V-PROP-DEED-TEXT"
"C-BASE|V-BNDY-TSHP-TEXT"
"C-BASE|V-ESMT-*"))
) ;_ end of not
) ;_ end of and
(vla-put-plotstylename Lay "G02060")
) ;_ end of if for C-BASE
) ;_ end of vlax-for
(vla-Regen ActDoc acActiveViewport)
(princ)
) ;_ end of defun
Solved! Go to Solution.