Author Topic: Extract Polyline points.  (Read 2724 times)

0 Members and 1 Guest are viewing this topic.

SPDCad

  • Bull Frog
  • Posts: 453
Extract Polyline points.
« on: January 24, 2005, 03:48:07 PM »
Anyone have any quick code to extracting the points of a polyline.
I have seen it posted here or at Cadalog a little while back but I can't seem to find it.
I also have some code for this buried in one of my lisp, but that two I can’t seem to find.
Boy, I am having a bad day! I need a vacation.  :)
AutoCAD 2010, w/ OpenDCL

visit: http://reachme.at/spd_designs

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Extract Polyline points.
« Reply #1 on: January 24, 2005, 04:44:32 PM »
Here's one way:
Code: [Select]

(setq pline (car (entsel)))
(setq ent (entget pline))
(setq coords (mapcar 'cdr
    (vl-remove-if-not
      '(lambda (x)
 (= 10 (car x)))
   ent)))

SPDCad

  • Bull Frog
  • Posts: 453
Extract Polyline points.
« Reply #2 on: January 25, 2005, 10:27:47 AM »
Thanks Jeff_M
AutoCAD 2010, w/ OpenDCL

visit: http://reachme.at/spd_designs

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Extract Polyline points.
« Reply #3 on: January 25, 2005, 04:47:05 PM »
Jeff,
You sure know how to cut right to the problem.
Very nice solution. :)

CAB
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.