您可以将网格用作视觉参考线,并打开对齐模式以限制光标移动。 除了设置间距外,您还可以调整捕捉和网格对齐方式。可以旋转路线,也可以将其设置为用于等轴测图形。 如果需要沿特定路线或角度绘制,可以旋转捕捉角度。捕捉角度旋转的中心点是捕捉基点。如果需要对齐填充图案,可以更改此点,该点通常设置为 0,0。 若要旋转捕捉角度,请使用该属性。若要更改捕捉角度旋转的基点,请使用该属性。SnapRotationAngleSnapBasePoint 注意:这两个属性都需要调用“更新”方法才能更新 AutoCAD 显示。
更改捕捉基点和旋转角度本示例将对齐基点更改为 (1,1),将对齐旋转角度更改为 30 度。网格处于打开状态,以便更改可见。 Sub Ch3_ChangeSnapBasePoint() ' Turn on the grid for the active viewport ThisDrawing.ActiveViewport.GridOn = True ' Change the snap base point to 1, 1 Dim newBasePoint(0 To 1) As Double newBasePoint(0) = 1: newBasePoint(1) = 1 ThisDrawing.ActiveViewport.SnapBasePoint = newBasePoint ' Change the snap rotation angle to 30 degrees (0.575 radians) Dim rotationAngle As Double rotationAngle = 0.575 ThisDrawing.ActiveViewport.SnapRotationAngle = rotationAngle ' reset the viewport ThisDrawing.ActiveViewport = ThisDrawing.ActiveViewport End Sub |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 )
GMT+8, 2024-5-12 16:36
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.