Hi,
I'm pretty rusty at AutoLisp, but I have been recently getting more active with it again.
For a routine I'm creating. I allow the user to pick polylines and I filter them out based on whether they are closed or not.
So I have the following setq
I'm filtering both on the 1 and 129 dxf 70 value, because I want to select all closed polylines independent of their plinegen value.
But somehow I don't get the -4 OR to work correctly, at this point it still only selects polylines with dxf (70 . 1) all closed polylines with plinegen enabled are filtered out, but I want them to be included.
Thanks for your time guys
Solved! Go to Solution.
Solved by cadffm. Go to Solution.
Hi,
; your way, just fixed
(sssetfirst nil
(setq polygonpolylines
(ssget
'((0 . "LWPOLYLINE")
;(-4 . (70 . 1)(70 . 129)(-4. "OR>") ) <- your line
(-4 . "<or")(70 . 1)(70 . 129)(-4 . "OR>")
)
)
)
)
; smarter, but not easier for you to understand / not so easily to read
(sssetfirst nil
(setq polygonpolylines
(ssget '((0 . "LWPOLYLINE")(-4 . "&")(70 . 1)))
)
)
Sebastian
The second way is a lot cleaner indeed, I was so focused on where I went wrong with the (-4 . "or") that I completely forgot that I could just check to see if any value contained the 1 bit.
Thanks a lot
Can't find what you're looking for? Ask the community or share your knowledge.