Select vertices of a polyline

By Augusto Goncalves

The vertices of the AcDbPolyline are not separate entities, that is why acedNentSelP() no longer works. The vertex information is now stored directly in the polyline entity. The AcDbPolyline supports GS Markers (Graphic System Markers), which means you can find out which vertex the user selected by a combination of ssget and ssnamex:

(setq s (ssget))
(setq marker (caddr (car (setq e (ssnamex s 0)))))
(setq e (entget (cadr (car e))))
(setq l 0)
(foreach i e
   (if (= 10 (car i))
      (progn
         (if (= l marker)
            (progn
               (princ (cdr i))
               (terpri)
            )
         )
         (setq l (1+ l))
      )
   )
)


Comments

4 responses to “Select vertices of a polyline”

  1. Hi, Augusto!
    “The vertices of the AcDbPolyline are not separate entities, that is why acedNentSelP() no longer works.”

  2. Thanks Alexander, I have fixed this type.
    Regards,
    Augusto Goncalves

  3. And now you can delete my comment. :-)

  4. I like the comments :) keep them coming.

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading