Author Topic: Help needed to continue line...  (Read 1888 times)

0 Members and 1 Guest are viewing this topic.

hudster

  • Gator
  • Posts: 2848
Help needed to continue line...
« on: March 23, 2005, 09:49:53 AM »
I'm writing a lisp that will draw a line from PT1 to PT2, but then I want to continue the line from pt2 to the next point and so on.

The code I have at the moment for this is
Code: [Select]

(setq pt1 (getpoint "\nSelect a point: "))
(setq pt2 (getpoint "\nSelect Next point: "))

how can I continue the lisp so that it re-starts, but uses pt2 as it's first point.
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

daron

  • Guest
Help needed to continue line...
« Reply #1 on: March 23, 2005, 09:53:08 AM »
Study this. It deals with arcs, but there's plenty you'll want to have in yours.

ronjonp

  • Needs a day job
  • Posts: 7529
Help needed to continue line...
« Reply #2 on: March 23, 2005, 09:54:12 AM »
From the library :)

Code: [Select]
(defun drawline (/)
  (command "_.line")
  ;;   repeat a point input until Enter
  (if (while (> (getvar "CMDACTIVE") 0)
(command pause)
      )
   )
)


Ron

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC