| Author |
Message |
Fatfreek
Guest
|
Posted:
Sat Dec 18, 2004 12:43 am Post subject:
Special closed polyline filters? |
|
|
I thought the following was good but it's not:
(ssget "x"
'((-4 . "&")
(70 . 1)
)
)
I'm trying to select only closed polys -- light or heavy. The old ellipses
are okay (pellipse = 1) but only the None and Fit, not the Quadratic or
Cubic.
Can someone help with a proper set of filters?
Len Miller
--
To email reply, eradicate all threes in my SPAM guarded address.
|
|
| Back to top |
|
 |
Dann
Guest
|
Posted:
Sat Dec 18, 2004 12:48 am Post subject:
Re: Special closed polyline filters? |
|
|
(setq sset(ssget "x" '((0 . "*polyline")(70 . 1))))
"Fatfreek" <mil3le3rlr@ark3ans3as.net> wrote in message
news:41c33615$1_3@newsprd01...
| Quote: | I thought the following was good but it's not:
(ssget "x"
'((-4 . "&")
(70 . 1)
)
)
I'm trying to select only closed polys -- light or heavy. The old
ellipses
are okay (pellipse = 1) but only the None and Fit, not the Quadratic or
Cubic.
Can someone help with a proper set of filters?
Len Miller
--
To email reply, eradicate all threes in my SPAM guarded address.
|
|
|
| Back to top |
|
 |
Jeff Mishler
Guest
|
Posted:
Sat Dec 18, 2004 12:50 am Post subject:
Re: Special closed polyline filters? |
|
|
This seems to work:
(ssget "x" '((0 . "*POLYLINE")(-4 . "<OR")(70 . 1)(70 . 3)(70 . 4)(70 .
129)(70 . 131)(70 . 132)(-4 . "OR>")))
--
Jeff
check out www.cadvault.com
"Fatfreek" <mil3le3rlr@ark3ans3as.net> wrote in message
news:41c33615$1_3@newsprd01...
| Quote: | I thought the following was good but it's not:
(ssget "x"
'((-4 . "&")
(70 . 1)
)
)
I'm trying to select only closed polys -- light or heavy. The old
ellipses
are okay (pellipse = 1) but only the None and Fit, not the Quadratic or
Cubic.
Can someone help with a proper set of filters?
Len Miller
--
To email reply, eradicate all threes in my SPAM guarded address.
|
|
|
| Back to top |
|
 |
BillZ
Guest
|
Posted:
Sat Dec 18, 2004 12:54 am Post subject:
Re: Special closed polyline filters? |
|
|
(SSGET "X" (LIST (CONS 8 "0")'(0 . "POLYLINE,LWPOLYLINE")'(-4 . "&")'(70 . 1)))
I think Paul T. posted this once.
Bill |
|
| Back to top |
|
 |
BillZ
Guest
|
Posted:
Sat Dec 18, 2004 12:57 am Post subject:
Re: Special closed polyline filters? |
|
|
forget the layer (if you want).
(SSGET "X" (list '(0 . "POLYLINE,LWPOLYLINE")'(-4 . "&")'(70 . 1))) |
|
| Back to top |
|
 |
Tom Smith
Guest
|
Posted:
Sat Dec 18, 2004 1:53 am Post subject:
Re: Special closed polyline filters? |
|
|
| Quote: | (SSGET "X" (list '(0 . "POLYLINE,LWPOLYLINE")'(-4 . "&")'(70 . 1)))
|
As long as we're on the filter-optimizing kick, I liked the wildcard usage
(SSGET "X" '((0 . "*POLYLINE") (-4 . "&") (70 . 1))) |
|
| Back to top |
|
 |
Jason Piercey
Guest
|
Posted:
Sat Dec 18, 2004 1:57 am Post subject:
Re: Special closed polyline filters? |
|
|
Interesting, I'm just the opposite. I prefer to specify
each entity type.
--
Autodesk Discussion Group Facilitator
"Tom Smith" <nospam> wrote in message news:41c34700$1_2@newsprd01...
| Quote: | (SSGET "X" (list '(0 . "POLYLINE,LWPOLYLINE")'(-4 . "&")'(70 . 1)))
As long as we're on the filter-optimizing kick, I liked the wildcard usage
(SSGET "X" '((0 . "*POLYLINE") (-4 . "&") (70 . 1)))
|
|
|
| Back to top |
|
 |
Tom Smith
Guest
|
Posted:
Sat Dec 18, 2004 2:30 am Post subject:
Re: Special closed polyline filters? |
|
|
| Quote: | Interesting, I'm just the opposite. I prefer to specify each entity type.
|
Sometimes you see some clever tricks to abbreviate filter lists. I liked
this one just because it reduced the verbosity in specifying both flavors of
plines -- spelling them out wouldn't make it any more clear for me.
Wildcards are frequently useful for me in filtering for block names, only
because we use highly consistent naming conventions. When I do a trick like
that, I'll add comments elaborating on my block name assumptions. So
ultimately it doesn't reduce the total amount of text in the lisp, but it
slims down the code itself. |
|
| Back to top |
|
 |
Jason Piercey
Guest
|
Posted:
Sat Dec 18, 2004 2:39 am Post subject:
Re: Special closed polyline filters? |
|
|
The only problem with the wildcards is if Autodesk
introduces new entity types it may cause you some
unwanted selection set filtering.
You may need to go back and revise *all that code*
to make them behave as they were intended. OTOH,
you could also say the same for wanting the new types
included in the selection set.
6 one way, half a dozen the other.
--
Autodesk Discussion Group Facilitator
"Tom Smith" <nospam> wrote in message news:41c34f96_3@newsprd01...
| Quote: | Interesting, I'm just the opposite. I prefer to specify each entity
type.
Sometimes you see some clever tricks to abbreviate filter lists. I liked
this one just because it reduced the verbosity in specifying both flavors
of
plines -- spelling them out wouldn't make it any more clear for me.
Wildcards are frequently useful for me in filtering for block names, only
because we use highly consistent naming conventions. When I do a trick
like
that, I'll add comments elaborating on my block name assumptions. So
ultimately it doesn't reduce the total amount of text in the lisp, but it
slims down the code itself.
|
|
|
| Back to top |
|
 |
Tom Smith
Guest
|
Posted:
Sat Dec 18, 2004 2:46 am Post subject:
Re: Special closed polyline filters? |
|
|
| Quote: | 6 one way, half a dozen the other.
|
I agree on both counts. If I'd been using '(0 . "*text*) to include mtext,
God only knows what some of those those functions would have done with rtext
when it appeared. Got any inside leads on new kinds of plines coming down
the pike? :-) |
|
| Back to top |
|
 |
Tom Smith
Guest
|
Posted:
Sat Dec 18, 2004 2:48 am Post subject:
Re: Special closed polyline filters? |
|
|
| "*text" that is |
|
| Back to top |
|
 |
Jason Piercey
Guest
|
Posted:
Sat Dec 18, 2004 2:56 am Post subject:
Re: Special closed polyline filters? |
|
|
If I told you, I'd have to kill you ;)
Seriously, I know nothing about any new polylines.
--
Autodesk Discussion Group Facilitator
"Tom Smith" <nospam> wrote in message news:41c35349$1_2@newsprd01...
| Quote: | 6 one way, half a dozen the other.
I agree on both counts. If I'd been using '(0 . "*text*) to include mtext,
God only knows what some of those those functions would have done with
rtext
when it appeared. Got any inside leads on new kinds of plines coming down
the pike? :-)
|
|
|
| Back to top |
|
 |
Fatfreek
Guest
|
Posted:
Sat Dec 18, 2004 8:06 pm Post subject:
Re: Special closed polyline filters? |
|
|
It does, indeed. I created a test drawing with a variety of 16 entities
including plain lines, arcs, circles, regions, heavy polys, and light polys.
Your snippet caught all 9 correct ones. My notes said that okay codes are
1, 129, 131. Not okay are 128, 133.
How did you derive the 3, 4, 131 and 132?
Most Grateful, Len
"Jeff Mishler" <jeff_m@cadvault.com> wrote in message
news:41c3387c$1_3@newsprd01...
| Quote: | This seems to work:
(ssget "x" '((0 . "*POLYLINE")(-4 . "<OR")(70 . 1)(70 . 3)(70 . 4)(70 .
129)(70 . 131)(70 . 132)(-4 . "OR>")))
--
Jeff
check out www.cadvault.com
"Fatfreek" <mil3le3rlr@ark3ans3as.net> wrote in message
news:41c33615$1_3@newsprd01...
I thought the following was good but it's not:
(ssget "x"
'((-4 . "&")
(70 . 1)
)
)
I'm trying to select only closed polys -- light or heavy. The old
ellipses
are okay (pellipse = 1) but only the None and Fit, not the Quadratic or
Cubic.
Can someone help with a proper set of filters?
Len Miller
--
To email reply, eradicate all threes in my SPAM guarded address.
|
|
|
| Back to top |
|
 |
Fatfreek
Guest
|
Posted:
Sat Dec 18, 2004 8:09 pm Post subject:
Re: Special closed polyline filters? |
|
|
Your code fetched 2 heavy and 1 light polylines of possible 3 heavy and 6
lights. I thought you'd like to know.
Thanks, Len
"Dann" <NoneSpecified> wrote in message news:41c3380a$1_3@newsprd01...
| Quote: | (setq sset(ssget "x" '((0 . "*polyline")(70 . 1))))
"Fatfreek" <mil3le3rlr@ark3ans3as.net> wrote in message
news:41c33615$1_3@newsprd01...
I thought the following was good but it's not:
(ssget "x"
'((-4 . "&")
(70 . 1)
)
)
I'm trying to select only closed polys -- light or heavy. The old
ellipses
are okay (pellipse = 1) but only the None and Fit, not the Quadratic or
Cubic.
Can someone help with a proper set of filters?
Len Miller
--
To email reply, eradicate all threes in my SPAM guarded address.
|
|
|
| Back to top |
|
 |
Fatfreek
Guest
|
Posted:
Sat Dec 18, 2004 8:14 pm Post subject:
Re: Special closed polyline filters? |
|
|
Your code got 5 heavy and 6 light polys of possible 3 heavy and 6 lights. I
suspect the 2 extra heavies were the quadratic and cubic ones.
Thanks, Len.
"BillZ" <nospam@address.withheld> wrote in message
news:26159592.1103313459115.JavaMail.jive@jiveforum2.autodesk.com...
| Quote: | forget the layer (if you want).
(SSGET "X" (list '(0 . "POLYLINE,LWPOLYLINE")'(-4 . "&")'(70 . 1))) |
|
|
| Back to top |
|
 |
|
|
|
|