Kevin Malone Posted July 19, 2021 Share Posted July 19, 2021 Hello, is there any way to select all points plotted on polyline vertices? Polyline is created by connecting points, now I need to select those points Quote Link to comment Share on other sites More sharing options...
CyberAngel Posted July 19, 2021 Share Posted July 19, 2021 The first thing that comes to mind is using the polyline as a fence. Anything that touches the polyline goes into the selection set. If you catch anything besides the points, use Quick Select to narrow it down to points only. Quote Link to comment Share on other sites More sharing options...
Kevin Malone Posted July 19, 2021 Author Share Posted July 19, 2021 Thank you for your reply. Fence requires to click on every vertex, right? I can't just select polyline Quote Link to comment Share on other sites More sharing options...
CyberAngel Posted July 19, 2021 Share Posted July 19, 2021 Sorry, I don't use fence, thought you could specify an object. Can you create a group for the points before you draw the polyline? That way you can select one and get them all. It would help to know more about what you're trying to accomplish, what constraints you have, etc. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted July 20, 2021 Share Posted July 20, 2021 If you have a pline made from pick points then just use the vertices co-ordinates. Replace (car plent) with (entlast) (setq plent (entsel "\nPick rectang")) (if plent (setq co-ord (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entget (car plent)))))) (princ co-ord) Quote Link to comment Share on other sites More sharing options...
Kevin Malone Posted July 20, 2021 Author Share Posted July 20, 2021 BIGAL, thank you for your reply. This lisp would just retrieve XY coordinates from polyline vertices, however these points are created using some custom AutoCAD extension for Survey and each one holds more information (height, name, datetime..). point.dwg Quote Link to comment Share on other sites More sharing options...
tombu Posted July 20, 2021 Share Posted July 20, 2021 The FS (Express Tool) https://help.autodesk.com/view/ACD/2022/ENU/?guid=GUID-A4FBF4EC-DE23-46A2-A576-AEED0E9847D4 works for selecting point objects but not Civil 3D objects. It worked on the point in your attached drawing but there's other selection methods for selecting the Civil 3D ones. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted July 21, 2021 Share Posted July 21, 2021 This is possibly what you want if the points are CIV3D cogo points (setq ss (ssget "F" co-ord (list (cons 0 "Aecc_Cogo_point")))) The dwg only has 1 Autocad point post a real CIV3D dwg and can explain more Quote Link to comment Share on other sites More sharing options...
Kevin Malone Posted July 21, 2021 Author Share Posted July 21, 2021 tombu, thank you for your reply. This tool will select all objects touching polyline, and I have more objects in dwg other then points. I need some kind of a tool that would make selection like: select all objects of this type whose geometry falls entirely within selected objects geometry. Bigal, this point I have attached is not COGO point from C3D, it's point created with custom extension (developed by company specialized for planning and surveying) and it is a classic AutoCAD point, but also (I don know how) it contains additional information. Right now, I'm trying to find a way to select points using GIS tools (which is fairly easy) without loosing information during dwg to GIS transformation. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted July 21, 2021 Share Posted July 21, 2021 (edited) 1. Xdata is information attached to an object, the "POINT" may have Xdata attached to it, in the sample dwg the point does not have any XDATA. 2. OD data is similar generally from GIS type of creation. (defun odtest () (setq ent (car (entsel "\n Select point: "))) (setq odname (ade_odgettables ent)) (if (= odname nil )(alert "no OD objects")(alert "OD objects found")) ) (odtest) Again returned no extra data. If it works for you post a dwg with correct points. Edited July 21, 2021 by BIGAL Quote Link to comment Share on other sites More sharing options...
Roy_043 Posted July 22, 2021 Share Posted July 22, 2021 6 hours ago, BIGAL said: in the sample dwg the point does not have any XDATA That is not correct: ( (-1 . <Entity name: 26190870>) (0 . "POINT") (5 . "B95") (330 . <Entity name: 25db68a0>) (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "PTO_02DET_TACKE_") (370 . -1) (100 . "AcDbPoint") (10 6396532.30206604 4982796.09996944 0.0) (210 0.0 0.0 1.0) (50 . 0.0) ( -3 ( "SURVEY" (1002 . "{") (1000 . "#VU=20111213.0717") (1000 . "#H=132.320") (1000 . "N=3") (1000 . "#T=7") (1002 . "}") ) ) ) Quote Link to comment Share on other sites More sharing options...
tombu Posted July 22, 2021 Share Posted July 22, 2021 So to select all the points in the drawing with "SURVEY" xdata. (sssetfirst nil (ssget "X" '((0 . "POINT")(-3 ("SURVEY"))))) Quote Link to comment Share on other sites More sharing options...
Kevin Malone Posted July 22, 2021 Author Share Posted July 22, 2021 Roy, that's right. Those are exact information from attached point. That is information I would lose if I transfer entire dwg into GIS software, create selection and then export selection into new dwg. 5 hours ago, tombu said: So to select all the points in the drawing with "SURVEY" xdata. (sssetfirst nil (ssget "X" '((0 . "POINT")(-3 ("SURVEY"))))) This will select all points containing this XDATA, but I need subset of them, only the one that are placed on (vertices) polyline. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted July 23, 2021 Share Posted July 23, 2021 Thanks roy_043 I was not drilling down enough. For Kevin go back to my post about get co-ordinates then can compare the point XYZ with the co-ordinates of the pline. Quote Link to comment Share on other sites More sharing options...
Kevin Malone Posted July 23, 2021 Author Share Posted July 23, 2021 BIGAL, if you are referring to On 7/20/2021 at 2:55 AM, BIGAL said: If you have a pline made from pick points then just use the vertices co-ordinates. Replace (car plent) with (entlast) (setq plent (entsel "\nPick rectang")) (if plent (setq co-ord (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entget (car plent)))))) (princ co-ord) It only prints out vertex coordinates, doesn't make any selection. Side question: how to list XDATA from object, and also how to create point with this XDATA? Quote Link to comment Share on other sites More sharing options...
mhupp Posted July 23, 2021 Share Posted July 23, 2021 1 hour ago, Kevin Malone said: It only prints out vertex coordinates, doesn't make any selection. That is correct. a polyline doesn't have any "points" on it to select. but if you want to create points off the polyline's vertices use the following. https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-comman-to-create-points/m-p/6287548/highlight/true#M340839 Quote how to list XDATA from object, and also how to create point with this XDATA? https://www.afralisp.net/autolisp/tutorials/extended-entity-data-part-1.php This explains more about xdata Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.