|
请教一下大家,我在CAD中移动了坐标原点(用UCS命令),手动画圆输入圆心坐标它是相对我UCS为0,0原点的这没错。
但是用VBA画圆时,它的圆心以最初的绝对坐标来画,这是什么原因?
代码如下:
Sub Example_Center()
Dim circObj As AcadCircle
Dim currCenterPt(0 To 2) As Double
Dim newCenterPt(0 To 2) As Double
Dim radius As Double
' Define the initial center point and radius for the circle
currCenterPt(0) = 20: currCenterPt(1) = 30: currCenterPt(2) = 0
radius = 3
' Create the circle in model space
Set circObj = ThisDrawing.ModelSpace.AddCircle(currCenterPt, radius)
ZoomAll
MsgBox "The center point of the circle is " & currCenterPt(0) & ", " & currCenterPt(1) & ", " & currCenterPt(2), vbInformation, "Center 示例"
End Sub
|
|