TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: w64bit on July 16, 2021, 05:07:48 AM
-
How can I make a selection set of regions having materials other than default materials (ByBlock, ByLayer or Global)?
-
If I understand correctly this can help:
; PrpVal wcmatch style
; (ALE_SelSet_RemoveByProperty #SSet1 'EntityTransparency "70") > = 70
; (ALE_SelSet_RemoveByProperty #SSet1 'EntityTransparency "~70") > /= 70
;
(defun ALE_SelSet_RemoveByProperty (SelSet PrpNam PrpVal / Countr EntNam EntObj)
(if SelSet
(repeat (setq Countr (sslength SelSet))
(and
(setq EntNam (ssname SelSet (setq Countr (1- Countr))) EntObj (vlax-ename->vla-object EntNam))
(vlax-property-available-p EntObj PrpNam)
(wcmatch (vlax-get EntObj PrpNam) PrpVal) ; 20210630 sostituito eq con wcmatch
(setq SelSet (ssdel EntNam SelSet))
)
)
)
SelSet
)
-
ss
"_X"
'(0 . "REGION")
'(-4 . "<NOT")
'(-4 . "<OR")
'(-4 . "OR>")
'(-4 . "NOT>")
)
)
)
-
Excellent.
Thank you all very much.