Author Topic: Loop for Pline input with Osnap tracking  (Read 1252 times)

0 Members and 1 Guest are viewing this topic.

BazzaCAD

  • Guest
Loop for Pline input with Osnap tracking
« on: October 19, 2018, 06:16:15 PM »
I use this code to loop while the user picks points & draw the Pline as they go.

Code - Auto/Visual Lisp: [Select]
  1. (command "pline")
  2. (setq pt nil)
  3. (while (if pt
  4.            (setq pt (getpoint pt "\nnext point: "))
  5.            (setq pt (getpoint "\nfirst point: "))
  6.        )
  7.   (command pt)
  8. )
  9.  

It works fine, but if they use Osnap tracking, the Pline snaps back the Osnap point instead of the tracked pick point.
Has anyone been able to work around this? No I can't turn off Osnaps while the user is picking points.


Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Loop for Pline input with Osnap tracking
« Reply #1 on: October 19, 2018, 06:40:59 PM »
Change (command pt) to (command "_non" pt)

BazzaCAD

  • Guest
Re: Loop for Pline input with Osnap tracking
« Reply #2 on: October 19, 2018, 07:12:24 PM »
Dah, that was easy.
Thanks Lee