AUTOCAD Selection within a Polyline

AUTOCAD Selection within a Polyline

chrisjune1994
Explorer Explorer
4,764 Views
4 Replies
Message 1 of 5

AUTOCAD Selection within a Polyline

chrisjune1994
Explorer
Explorer

Hi all,

 

Ive got a large drawing (map) which includes several layers and different features. Ive inserted Polylines on top of the map which indicate a specific area and i want to select everything within that one area and exclude the rest so the data i export into excel only includes the points which are required. Easy enough to delete sections however the shape of the polyline is very irregular so finding a solution has been dificult. The closed ive got i think is by using the polygon command however i ant get it to work completely or the way i want it to.

 

Probably not explained in the best way but nay help would be greatly appreciated. Could post pictures if anyone thinks they could help

 

Thanks,

 

Chris.

0 Likes
4,765 Views
4 Replies
Replies (4)
Message 2 of 5

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

this sounds like a typical GIS-task, so the question is do you have a GIS-application (e.g. AutoCAD Map 3D or AutoCAD Civil 3D or something like QGis) or just plain AutoCAD?

Is the data stored as AutoCAD geometry (so as DWG and not as GIS-datasets like SHP/SQLite/...)?

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 3 of 5

ВeekeeCZ
Consultant
Consultant

There are several routines upon this task. Very last one is made by @hmsilva here, post #10

 

Only thing that needs to be change is this line 

 

(command "_.erase" ss1 "_R" ss "")

to this line

 

(command "_.select" ss1 "_R" ss "")

... then it's stored as "previous" selection. 

0 Likes
Message 4 of 5

Anonymous
Not applicable

The simpliest solution I can think of in AutoCAD 2016 is to use the lasso selection mode. This of course if your polyline shape is not too complex.

 

Or you can use a bit of LISP like Serge Camiré code:

 

(setq plineSel (entsel "\nChoose the polyline: "))
(setq pline (car plineSel))
(setq plineGet (entget pline))
(setq vertex (mapcar 'cdr (vl-remove-if '(lambda (x) (/= (car x) 10)) plineGet)))
(setq ss (ssget "_wp" vertex)) ; //(or _CP)

0 Likes
Message 5 of 5

vladimir_michl
Advisor
Advisor

You can use the WPS utility and enter 'WPS on any "Select objects:" prompt. See:

http://www.cadforum.cz/cadforum_en/qaID.asp?tip=5697

 

Vladimir Michl, www.cadstudio.cz  www.cadforum.cz