Message 1 of 4

Not applicable
02-03-2015
01:14 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everyone
Found this nice lisp on the forums which works well with only one wildcard. How can I make it search for multiple wildcards
e.g.
(if (vl-string-search "*Layer001*,*Layer002*,*Layer003*" (vla-get-name x))
(defun C:ToggleXrefLayers (/ layers) (vl-load-com) (setq layers (vla-get-layers (vla-get-activedocument (vlax-get-acad-object)))) (vlax-for x layers (if (vl-string-search "|Layer001" (vla-get-name x)) (progn (cond ((= (vla-get-freeze x) :vlax-true) (vla-put-freeze x :vlax-false)) (T (vla-put-freeze x :vlax-true))) (cond ((= (vla-get-layeron x) :vlax-true) (vla-put-layeron x :vlax-false)) (T (vla-put-layeron x :vlax-true))) ) ) ) (command "regen") (princ) )
PLease help! thanks in advance
Solved! Go to Solution.