VL做块再插入的方法 |
|
(vl-load-com)
(defun c:tt (/ doc ms blks blkdef)
(setq ms (vlax-get-property
(setq doc (vlax-get-property
(vlax-get-acad-object)
'activedocument
)
)
'modelspace
)
blks (vlax-get-property doc 'blocks)
)
(setq blkdef (vla-add blks (vlax-3d-point '(0. 0. 0.)) "*U"))
|
(vla-addline
blkdef
(vlax-3d-point '(0. 0. 0.))
(vlax-3d-point '(1. 1. 0.))
)
(vla-addcircle blkdef (vlax-3d-point '(0. 0. 0.)) 2.)
(vla-insertblock
ms
(vlax-3d-point (getvar "viewctr"))
(vla-get-name blkdef)
1.
1.
1.
0.
)
(princ)
) |
|
posted on 2008-05-02 14:13
深藏记忆 阅读(320)
评论(0) 编辑 收藏 所属分类:
转载Vlisp