CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

AutoCAD 2021 开发者帮助

关于定义缩放窗口 (VBA/ActiveX)

2024-5-18 18:31| 发布者: admin| 查看: 72| 评论: 0|原作者: admin|来自: AutoCAD

关于定义缩放窗口 (VBA/ActiveX)

您可以通过指定定义某个区域的角来快速放大该区域。

若要通过指定区域边界来放大区域,请使用 or 方法。该方法允许您以编程方式定义表示缩放窗口的两个点。该方法要求用户选择两个点。这两个选取的点成为缩放窗口。ZoomWindowZoomPickWindowZoomWindowZoomPickWindow

将活动图形缩放到由两个点定义的窗口

Sub Ch3_ZoomWindow()
  ' ZoomWindow
  MsgBox "Perform a ZoomWindow with:" & vbCrLf & _
  "1.3, 7.8, 0" & vbCrLf & _
  "13.7, -2.6, 0", , "ZoomWindow"

  Dim point1(0 To 2) As Double
  Dim point2(0 To 2) As Double
  point1(0) = 1.3: point1(1) = 7.8: point1(2) = 0
  point2(0) = 13.7: point2(1) = -2.6: point2(2) = 0
  ThisDrawing.Application.ZoomWindow point1, point2
  ' ZoomPickWindow
  MsgBox "Perform a ZoomPickWindow", , "ZoomPickWindow"

  ThisDrawing.Application.ZoomPickWindow
End Sub

路过

雷人

握手

鲜花

鸡蛋

最新评论

QQ|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1   苏公网安备32011402011833)

GMT+8, 2024-12-15 12:46

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部