我从不需要重置我的initdia
我使用“.-plot”,重复和vla getboundingbox进行循环
- (setq ss (ssget "x" (list '(0 . "INSERT")(cons 2 [color=blue][b]Blkname[/b][/color])(cons 410 (getvar 'CTAB)))))
- (repeat (setq i (sslength ss))
- (vla-getboundingbox
- (setq blockobject
- (vlax-ename->vla-object (ssname ss (setq i (1- i))))
- )
- 'lowerleft 'upperright
- )
- (command [color=blue][b]".-plot"[/b][/color] "Y" "" "pltDevice" "ANSI B (11.00 x 17.00 Inches)"
- "Inches" "Landscape"
- "N" "Window" (trans (vlax-safearray->list lowerleft) 0 1)
- (trans (vlax-safearray->list upperright) 0 1) "Fit" "Center" "Y" "pltStyles" "Y" "Y" "N" "N"
- "N" "N" "Y")
希望这有帮助 |