请教:用lisp编程插入图块,保留CAD对话框界面
请教:用lisp编程插入图块,保留CAD对话框界面,主要是选择图块名称,然后自动按指定的点插入 (vla-SendCommand (vla-get-ActiveDocument (vlax-get-acad-object)) "insert ") (vla-SendCommand (vla-get-ActiveDocument (vlax-get-acad-object)) "insert ")用不了,能解释下吗?
我主要想插入图中自带的图块,但输入了块名都找不到所以想我看你留对话窗 我主要想插入图中自带的图块,但输入了块名都找不到所以想保留对话窗 lisp能找图中自带的图块吗,例如图中一个符号叫c1,直接用insert能找到并插入,但lisp调用insert就找不到 你用lisp调用insert是怎么调的?代码看看呢 (setq n (getstring "\n图块名: "))
(Command "insert" n p1 "1" "1" "0") (setq n (getstring "\n图块名: "))
(if (tblsearch "BLOCK" n) (command ...)) 确实不错,现在能用了,谢谢了 ;;;插入块
(defun c:crt ()
(setvar "cmdecho" 0)
(setq n (getstring "\n图块名: "))
(while (setq pt (getpoint "\n-->请选取插入点:"))
(command "insert" n pause 1 1 0)
(command "_.explode" "L")
(command "_.chprop" "P" "" "LA" (getvar "CLAYER") ""))
(princ)
)
页:
[1]
2