缩放扩展所有布局
你好我通常在一个文件中绘制一些布局。
回顾时,在缩放一个布局后,我忘记了在移动到其他布局之前缩放扩展。
保存和关闭文件时出现问题我需要很多时间缩放和扩展所有布局。
能帮我做一个缩放扩展所有布局的例程吗。
多谢。
皮瑟·鲁卡 ;Zom扩展了所有布局
(defun c:LZE (/ Ctab Layout)
(princ "\nLayouts Zoom Extents")
(setq Ctab (getvar "CTAB"))
(foreach Layout (layoutlist)
(command "LAYOUT" "S" Layout)
(command "PSPACE")
(command "ZOOM" "E")
)
(setvar "CTAB" Ctab)
(princ)
)
;缩放窗口所有布局
(defun c:LZW (/ Ctab Layout P1 P2)
(princ "\nLayouts Zoom Window")
(if (/= (setq Ctab (getvar "CTAB")) "Model")
(progn
(command "PSPACE")
(if (setq P1 (getpoint "\nSpecify first corner: "))
(setq P2 (getcorner P1 "Specify opposite corner: "))
)
(if (and P1 P2)
(foreach Layout (layoutlist)
(command "LAYOUT" "S" Layout)
(command "PSPACE")
(command "ZOOM" "W" P1 P2)
)
)
)
(command "ZOOM" "W")
)
(setvar "CTAB" Ctab)
(princ)
)
如果它被锁定,这些会解锁视口吗? 上述例程中的缩放操作是在布局图纸级别执行的,因此不会影响其中包含的视口比例。
知道了!我以为它在视口内
测试和工作!应该是有用的例行公事!
谢谢! 另一个版本:
;; Zoom Extents all Layouts-Lee Mac
(defun c:zea ( / app ctb doc )
(setq app (vlax-get-acad-object)
doc (vla-get-activedocument app)
ctb (getvar 'ctab)
)
(foreach tab (layoutlist)
(setvar 'ctab tab)
(vla-put-mspace doc :vlax-false)
(vla-zoomextents app)
)
(setvar 'ctab ctb)
(princ)
)
(vl-load-com) (princ) 这里有一个我和我的保存按钮合并在一起
; Zoom All - In all layouts with one command
(defun c:ZoomLayouts ( / ctab)
(setq ctab (getvar "ctab"))
(foreach tab (cons "Model" (layoutlist))
(setvar 'CTAB tab)
(command "zoom" "e" "limits" "off")
)
(setvar "ctab" ctab)
(princ)
嗨,李,有没有可能调整例行程序,让它问用户需要什么缩放?
以什么方式?在范围/中心/全部之间选择? 例如,范围之间和不同比例的缩放比例最低,分别为50%、75%、95%和最后一个范围。我已经调整了上述例程,但不得不再做三次,并将它们标记为ZEA50、ZEA75、ZEA95和ZEA。另一个修改是让它询问是只应用于当前布局还是应用于所有布局。
在关闭并保存文件之前,我运行了ZEA75例程,该例程将当前图形中的所有布局缩放到屏幕上显示空间的75%。然后我保存并关闭文件,为下一个工作日做好准备。
页:
[1]
2