View Single Post
  #4 (permalink)  
Old October 7th, 2006, 10:41 AM
Halaszm
 
Posts: n/a
Lightbulb Snap to midpoint

Hi!

A solution is a short AutoLisp macro:
(defun midpt (/ a b)
(initget 1)
(setq a (getpoint "\nFirst point: "))
(initget 1)
(setq b (getpoint "\nSecond point: "))
(setq pt (polar a (angle a b) (/ (distance a b) 2.0)))
)
Using this you should copy it to visual lisp editor, save it, and load to Autocad. Then choose a command eg LINE, enter (midpt) and follow the instructions in the command line.
There is a possibility to load it automatically or make an icon-button too.
If you have any problem do not hesitate to ask me.

Best regards
Halaszm
Reply With Quote