Author Topic: Last Point  (Read 1664 times)

0 Members and 1 Guest are viewing this topic.

cmwade77

  • Swamp Rat
  • Posts: 1443
Last Point
« on: December 09, 2014, 01:51:08 PM »
Ok, I have some code that allows me to continue picking points for the pline command. I now need to know the last point picked from the command.
Code: [Select]
(command "._pline" "_S" "_N" "_M" Pt1 PT2)
(while (= 1 (logand (getvar 'CMDACTIVE)))
     (princ "\rSpecify next point [Arc/Undo] <Enter or C to Finish>: ")
     (command pause)
)
I am ok with changing the code around, but it is important that the user can pick any number of points before pressing enter and that the command show exactly what will be drawn (please note the actual command isn't always pline, so it may not always be straight lines or arcs).

Any help with this is much appreciated.

ronjonp

  • Needs a day job
  • Posts: 7529
Re: Last Point
« Reply #1 on: December 09, 2014, 01:53:01 PM »
(getvar 'lastpoint) ?

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

cmwade77

  • Swamp Rat
  • Posts: 1443
Re: Last Point
« Reply #2 on: December 09, 2014, 01:53:49 PM »
(getvar 'lastpoint) ?
Yes, I just figured that out....don't I feel silly now....LOL

ronjonp

  • Needs a day job
  • Posts: 7529
Re: Last Point
« Reply #3 on: December 09, 2014, 02:08:36 PM »
(getvar 'lastpoint) ?
Yes, I just figured that out....don't I feel silly now....LOL
:)

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC