大家好。
在论坛的研究中,我发现了一个由Lee Mac编写的lisp程序,该程序可以插入图形中的所有块,并要求插入点。我发现它非常有用。
可以适应插入从csv文件读取的块,并带来值属性?
块未加载到图形中,因此目录先前加载到Suppot文件搜索路径中。
这就是上面提到的程序。
- (DEFUN C:BLKINS (/ pt name)
- (vl-load-com)
-
- (setq *acad* (vla-get-ActiveDocument
- (vlax-get-acad-object)))
- (setq *ms* (vla-get-ModelSpace *acad*))
- (vlax-for item (vla-get-Blocks *acad*)
- (if (and (not (eq "*" (substr (setq name (vla-get-Name item)) 1 1)))
- (setq pt (getpoint "\nSelect Point for Block: ")))
-
- (vlax-invoke-method *ms* 'InsertBlock (vlax-3d-point pt) name 1.0 1.0 1.0 0.0)))
- (princ))
提前谢谢你。
你好,路易斯·奥古斯托。 |