Hi ,I am trying to write a lisp code to automatically draw a vertical line to a point of another already drawn object (such as Line,Pline,arc,etc.)
I want to work like this :
1)First specify the side where the new line will be drawn
2)Specify the point on the already designed object
3)Ender the length of the new line (by number or distance on screen)
Look an example in gif file. I upload a test.dwg for the units of my template.
I am new in lisp.I try to start the code like this but i need help to finish the code.
(defun c:verline
(pt1 pt2 pt3 pt4 pt5 l
) (setvar "OSMODE" 513) ; END,NEAREST (setq pt1
(getpoint "\nPick point to specify the side where the new line will be drawn: ")) (setq pt2
(getpoint "\nPick point on the already designed object: ")) (setq pt3
(getpoint "\nPick 1st point for distance on screen: ")) (setq pt4
(getpoint "\nPick 2nd point for distance on screen: ")) ;---------------------------------------------------------------------------------------------------
;---------------------------------------------------------------------------------------------------
(setq pt5
;<----------------- correct angle point in correct length vertical to line
(command "_line" "non" pt2
"non" pt5
"") (setvar "OSMODE" 13) ; NODE,END,CENTER ;layer 0
(mapcar '
setvar '
("clayer" "cecolor" "celtype" "celweight") (list "0" "BYLAYER" "BYLAYER" -1)) );end defun
Thanks