@Kent1Cooper wrote:
If you're talking about ones that have a linetype override, then @komondormrex 's approach should work, but I think not if the selected source object is ByLayer in linetype, because ... it will find all objects of the same type and Layer, no matter what their linetype.
This seems to overcome that issue with a source object of ByLayer Linetype, in limited testing:
(defun C:SSTLL (/ edata n ent); = Selection Set of same object Type, Layer & Linetype
(setq edata (entget (car (entsel "\nSample object: "))))
(setq SameTypeLayerLtype
(ssget "_X"
(if (assoc 6 edata)
(list (assoc 0 edata) (assoc 8 edata) (assoc 6 edata)); then -- all 3
(list (assoc 0 edata) (assoc 8 edata)); else -- by Type & Layer only
); if
); ssget
); setq
(if (not (assoc 6 edata)); if source is ByLayer Linetype, remove any with override
(repeat (setq n (sslength SameTypeLayerLtype))
(setq ent (ssname SameTypeLayerLtype (setq n (1- n))))
(if (assoc 6 (entget ent)) (ssdel ent SameTypeLayerLtype))
); repeat
); if
(sssetfirst nil SameTypeLayerLtype); select/grip/highlight
); defun
And it works for any kind of object. There may be a more concise way to do it -- I was hoping for a relational test with (-4) entries, but didn't find a way.
Kent Cooper, AIA