私はオートキャドを試していて、長方形と線の間に「ハイウェイ」を作りたいと思っています。長方形から2点が必要です。何か案は?
(setq en(car(entsel"\Get rectangle : ")))
(entget en)
私のコード全体
(defun temaLisp(/ )
;HIGHWAY BUILDER
;My project is a highwaybulder
;How does it work?
;Select a rectangle and draw from there to a distance the highway where it meets a stop(Line)
(princ "TemaLisp ")
;get rectangle (prompt "\nSelect the ends of a station")
(setq en(car(entsel"\Get rectangle : ")))
(entget en)
;get the stop (Line)
(setq line2 (car (entsel "\nSelect the second line: ")))
(setq p3 (cdr (assoc 10 (entget line2))))
(setq p4 (cdr (assoc 11 (entget line2))))
;of the highway &optional (size 50)
(setq mid1 (midpt pt3 pt4)) ; midpoint for dotted line
; Draw the lines
(command "line" mid1 mid2)
)