通过使用该特性更改视图的中心点,可以在绘图窗口中重新定位图像。当视图的中心点发生更改且视图的大小未更改时,视图将平行于屏幕平移。CenterPoint 将活动图形放大到指定中心此示例代码演示如何使用“操作当前视图”主题下定义的缩放过程更改当前视图的中心点。 虽然 Zoom 过程总共传递了四个值,但前两个值被定义为新的 3D 点,并且该过程将忽略这些值。第三个值是用于定义视图的新中心点的点 (5,5,0),最后一个值传入 1 以保留当前视图的大小。 VB.NET<CommandMethod("ZoomCenter")> _ Public Sub ZoomCenter() '' Center the view at 5,5,0 Zoom(New Point3d(), New Point3d(), New Point3d(5, 5, 0), 1) End Sub C#[CommandMethod("ZoomCenter")] static public void ZoomCenter() { // Center the view at 5,5,0 Zoom(new Point3d(), new Point3d(), new Point3d(5, 5, 0), 1); } VBA/ActiveX 代码参考Sub ZoomCenter() Dim Center(0 To 2) As Double Dim magnification As Double Center(0) = 5: Center(1) = 5: Center(2) = 0 magnification = 1 ThisDrawing.Application.ZoomCenter Center, magnification End Sub 父主题: |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-1-20 03:33
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.