合并指定目录下所有的DWG文件
(vl-load-com)
(defun MergeFiles (x)
((lambda (z o)
(mapcar '(lambda (y)
(vla-explode (vla-insertblock z o (strcat x "\\" y))))
(vl-remove-if
'(lambda (y) (/= (vl-filename-extension y) ".dwg"))
(vl-directory-files x))))
(vla-get-modelspace
(vla-get-activedocument (vlax-get-acad-object)))
(vlax-3d-point 0 0)))
网友评论