关于居中对象 (ActiveX)
将活动图形放大到指定中心。
您可以将图形中的特定点移动到图形区域的中心。该方法可用于调整对象大小并将其置于视口的中心。使用 ,可以通过输入相对于当前视图的放大倍率来指定比例大小。ZoomCenterZoomCenter
将活动图形放大到指定中心
以下示例显示了用于以相同大小和两倍大小显示视图的效果:ZoomCenter
- AutoLISP
-
(vl-load-com)
(defun c:Ch3_ZoomCenter()
(alert (strcat "Perform a ZoomCenter using:\n"
"Center: 3, 3, 0\n"
"Magnification: 10"))
(setq Center (vlax-3d-point 3 3 0)
magnification 10)
(setq acadObj (vlax-get-acad-object))
(vla-ZoomCenter acadObj Center magnification)
)
- VBA(仅限 AutoCAD)
-
Sub Ch3_ZoomCenter()
MsgBox "Perform a ZoomCenter using:" & vbCrLf & _
"Center: 3, 3, 0" & vbCrLf & _
"Magnification: 10", , "ZoomCenter"
Dim Center(0 To 2) As Double
Dim magnification As Double
Center(0) = 3: Center(1) = 3: Center(2) = 0
magnification = 10
ThisDrawing.Application.ZoomCenter Center, magnification
End Sub
|