- (defun c:tt ()
- (setvar "cmdecho" 0)
- (if (null DTU-MultiSelectDialog) (command "netload" (findfile "DTU-MultiSelectDialog2013.dll")))
- (setq ao (vlax-get-acad-object))
- (setq ad (vla-get-activedocument ao))
- (setq ms (vla-get-modelspace ad))
- (setq lst (DTU-MultiSelectDialog "请选择DWG文件" "DWG文件(*.dwg)|*.DWG" ))
- (setq pt0 (getpoint "\n起始点<退出>: "))
- (setq i 0)
- (foreach l lst
- (setq i (1+ i)
- pt (vlax-3D-point pt0)
- e1 (vla-InsertBlock ms pt l 1 1 1 0)
- )
- (vla-getboundingbox e1 'll 'ur)
- (setq p1 (vlax-safearray->list ll)
- p9 (vlax-safearray->list ur)
- dx (- (car p9) (car p1))
- )
- (vla-move e1 (vlax-3D-point p1) (vlax-3D-point pt0))
- (setq pt0 (polar pt0 0 dx))
- (princ (strcat "\n>>>第" (itoa i) "张:" l "\n"))
- )
- (princ (strcat "\n>>>操作结束,共合并" (itoa i) "张图。"))
- (setvar "cmdecho" 1)
- (princ)
- )
|