| Author |
Message |
John Cutler
Guest
|
Posted:
Fri Jan 07, 2005 12:40 am Post subject:
Need selection tool - all objects inside a selected object |
|
|
Hi, all --
I've been through Express tools and don't see what I need....
Is there a selection tool that will select all objects that are within and
crossed by a selected object?
For example, select all polygons, points, circles, arcs, etc., that are
inside and crossed by a selected polygon?
I can live with a selection tool that selects those objects only INSIDE the
selected object (doesn't have to also select objects touched or crossed by
the selected object).
Thanks.
--
John
)))))))
(o)-(o)
-----oo0---(_)---0oo--------------------------
| | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | |
John Cutler -- Mapping/GIS Director,
Ozark Regional Land Trust
(Ozark Bioregion - MO/AR/KS/OK)
2435 Sweetwater Lane
Mansfield MO 65704
(417) 741-7363 - Work
(870) 365-5938 - Cell
jcutler@getgoin.net
www.orlt.org
|
|
| Back to top |
|
 |
Jeff Mishler
Guest
|
Posted:
Fri Jan 07, 2005 12:58 am Post subject:
Re: Need selection tool - all objects inside a selected obje |
|
|
Get the coordinates of the selected polygon and feed them as Fence points to
(ssget "f" pts).
--
Jeff
check out www.cadvault.com
"John Cutler" <jcutler@getgoin.net> wrote in message
news:41dd9429$1_2@newsprd01...
| Quote: | Hi, all --
I've been through Express tools and don't see what I need....
Is there a selection tool that will select all objects that are within and
crossed by a selected object?
For example, select all polygons, points, circles, arcs, etc., that are
inside and crossed by a selected polygon?
I can live with a selection tool that selects those objects only INSIDE
the
selected object (doesn't have to also select objects touched or crossed by
the selected object).
Thanks.
--
John
)))))))
(o)-(o)
-----oo0---(_)---0oo--------------------------
| | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | |
John Cutler -- Mapping/GIS Director,
Ozark Regional Land Trust
(Ozark Bioregion - MO/AR/KS/OK)
2435 Sweetwater Lane
Mansfield MO 65704
(417) 741-7363 - Work
(870) 365-5938 - Cell
jcutler@getgoin.net
www.orlt.org
|
|
|
| Back to top |
|
 |
Tom Smith
Guest
|
Posted:
Fri Jan 07, 2005 1:32 am Post subject:
Re: Need selection tool - all objects inside a selected obje |
|
|
| Quote: | Get the coordinates of the selected polygon and feed them as Fence points
to
(ssget "f" pts).
|
Why not use the CP method and pick the vertices of the polygon for the
points? I once had a routine to extract the points from a selected polyline
and feed them to the WP or CP selection methods, but I don't have it handy
now.
|
|
| Back to top |
|
 |
Kent Cooper, AIA
Guest
|
Posted:
Fri Jan 07, 2005 2:35 am Post subject:
Re: Need selection tool - all objects inside a selected obje |
|
|
Not just "why not use the CP method" -- you really have to use that to get
what the original poster is after. The Fence method will only find things
that cross the path of fence points, but will not find things enclosed
within it if they don't touch it.
--
Kent Cooper, AIA
"Tom Smith" wrote...
| Quote: | Get the coordinates of the selected polygon and feed them as Fence points
to
(ssget "f" pts).
Why not use the CP method and pick the vertices of the polygon for the
points? I once had a routine to extract the points from a selected
polyline
and feed them to the WP or CP selection methods, but I don't have it handy
now. |
|
|
| Back to top |
|
 |
Kent Cooper, AIA
Guest
|
Posted:
Fri Jan 07, 2005 9:33 pm Post subject:
Re: Need selection tool - all objects inside a selected obje |
|
|
I'm realizing that if the "selected polygon" includes arc segments, feeding
its coordinates to either F or CP selection could "fail" in John's goal,
possibly in both directions (missing some things it should select, and
selecting some things it shouldn't).
Because F and CP don't believe in curves, the selection would look along the
straight line between the ends of an arc segment of the polyline (the
chord). If there is an outward-bulging arc segment, the selection would
miss an object that's crossed by that arc segment, if it's far enough out
not to be crossed by the chord. Likewise, if the polyline includes an
inward-bulging arc segment, the selection would find objects that it
shouldn't, if they're close enough to cross the chord but the arc segment
doesn't cross them.
John, would you want to be able to select using a circle, or to select
things-that-cross-only, using non-closed objects like lines or arcs or open
polylines?
--
Kent Cooper, AIA
"Jeff Mishler" wrote...
| Quote: | Get the coordinates of the selected polygon and feed them as Fence points
to (ssget "f" pts).
.....
"John Cutler" wrote...
.....
Is there a selection tool that will select all objects that are within
and
crossed by a selected object?
For example, select all polygons, points, circles, arcs, etc., that are
inside and crossed by a selected polygon?
I can live with a selection tool that selects those objects only INSIDE
the
selected object (doesn't have to also select objects touched or crossed
by
the selected object). |
|
|
| Back to top |
|
 |
Tom Smith
Guest
|
Posted:
Fri Jan 07, 2005 9:56 pm Post subject:
Re: Need selection tool - all objects inside a selected obje |
|
|
| Quote: | John, would you want to be able to select using a circle, or to select
things-that-cross-only, using non-closed objects like lines or arcs or
open
polylines?
|
I wondered the same, Kent. That would be a darn handy selection tool if
someone would create it! |
|
| Back to top |
|
 |
Marco Jacinto
Guest
|
Posted:
Sat Jan 08, 2005 2:06 am Post subject:
Re: Need selection tool - all objects inside a selected obje |
|
|
I think this kind of selection is done already by the Extrim command from
the express tools,
when you extrim a circle it draws a Pline to use it as a cutting edge, hope
this helps
Saludos
Marco Jacinto
"Tom Smith" <nospam> escribió en el mensaje news:41debefc$1_2@newsprd01...
| Quote: | John, would you want to be able to select using a circle, or to select
things-that-cross-only, using non-closed objects like lines or arcs or
open
polylines?
I wondered the same, Kent. That would be a darn handy selection tool if
someone would create it!
|
|
|
| Back to top |
|
 |
Tom Smith
Guest
|
Posted:
Sat Jan 08, 2005 2:19 am Post subject:
Re: Need selection tool - all objects inside a selected obje |
|
|
| Quote: | I think this kind of selection is done already by the Extrim command from
the express tools |
Thanks! It appears you are correct. That's a tool that I have neglected to
explore. |
|
| Back to top |
|
 |
John Cutler
Guest
|
Posted:
Sat Jan 08, 2005 8:13 am Post subject:
Re: Need selection tool - all objects inside a selected obje |
|
|
Well, my original thought was to select all objects inside a closed
polyline.
I'm working with ArcView .shp file data that have been imported to AutoCAD,
and want to select all the county objects within a state border, or all the
road objects or city polygons within a county, etc. Not all the inside
objects are closed objects -- e.g., sometimes the outline of a lake will
actually consist of several unconnected polylines even though the lake
appears as a closed polyline.
I think the most useful routine to me would be one that selected all the
objects (line, circle, polyline, arc, etc.) within a CLOSED object.
Selecting all objects that are inside OR crossing would be useful in another
situation I'm working on. Could these functions be combined in the same
routine by asking an initial question and setting a parameter for <I>nside
or <C>rossing?
Regarding whether the bounding object is a polyline and/or circle --- a
polyline is the most important; a circle might be useful in some situations.
I'm mostly doing map work, so circles are rare.
Thanks
J
"Tom Smith" <nospam> wrote in message news:41debefc$1_2@newsprd01...
| Quote: | John, would you want to be able to select using a circle, or to select
things-that-cross-only, using non-closed objects like lines or arcs or
open
polylines?
I wondered the same, Kent. That would be a darn handy selection tool if
someone would create it!
|
|
|
| Back to top |
|
 |
Jipthiyas
Guest
|
Posted:
Sat Jan 08, 2005 3:26 pm Post subject:
Re: Need selection tool - all objects inside a selected obje |
|
|
Try this. You need to input (ssx1) when select prompt occurs
(defun ssx1()
(setq enn1 (entsel "\nSelect th Boundary Polyline.. "))
(if enn1
(progn
(setq evv1 (vlax-ename->vla-object (car enn1)))
(setq evv1_name (vlax-get-property evv1 'ObjectName))
(if (= evv1_name "AcDb2dPolyline" )
(progn
(setq exp_cordinates_array (Vlax-get-property evv1 'coordinates))
(setq poly_coord_list1 (vlax-safearray->list (vlax-variant-value exp_cordinates_array)))
(setq req_cord_list nil)
(while (and poly_coord_list1 (nth 2 poly_coord_list1))
(setq req_cord_list (append req_cord_list (list (list (nth 0 poly_coord_list1)(nth 1 poly_coord_list1) (nth 2 poly_coord_list1)))))
(setq poly_coord_list1 (cdr (cdr (cdr poly_coord_list1))))
)
;to close the polyline
(setq first_cord_list (nth 0 req_cord_list))
(setq req_cord_list (append req_cord_list (list (list (nth 0 first_cord_list)(nth 1 first_cord_list) (nth 2 first_cord_list)))))
)
)
)
)
(ssget "cp" req_cord_list)
) |
|
| Back to top |
|
 |
|
|
|
|