cad lisp二次开发实例

各位大虾有没有实例?比最简单级别的复杂些的~
2024-12-13 02:48:33
推荐回答(1个)
回答1:

;(DEFUN C:IX();穿线孔
; (setq slay (getvar "clayer"))
; (command"-INSERT" "IX" "\\" "1" "1" "0""")
; (princ))

(defun c:vl();竖直直线
(command "_.XLINE" "v" pause)
(princ)
)
(defun c:hl();水平直线
(command "_.XLINE" "h" pause)
(princ)
)

(DEFUN C:jj();串线
(setvar "cmdecho" 0)
(setvar "cmddia" 0)
(setq jj (ssget))
(command "_pedit" "m" jj "" "j" "1" "")
(setvar "cmdecho" 1)
(setvar "cmddia" 1)
(princ))