- UID
- 737496
- 积分
- 10
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2014-9-16
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
各位前辈:我抄了如下一个已知圆心半径 起点终点的代码。但是不知道它放在VB的窗口代码中 类代码中还是块代码中请指点。谢谢
我在userform1 中 Option Explicit 写下
Public Function AddArcByCenterStartEndPoint(ByVal centerpoint As Variant, ByVal startPoint As Variant, ByVal endPoint As Variant) As AcadArc
Debug.Assert (VarType(startPoint) = vbArray + vbDouble)
Debug.Assert (VarType(centerpoint) = vbArray + vbDouble)
Debug.Assert (VarType(endPoint) = vbArray + vbDouble)
Dim radius1 As Double, radius2 As Double
radius1 = math.getdistancebetween2Point(centerpoint, startPoint)
radius2 = math.getdistancebetween2Point(centerpoint, endPoint)
Debug.Assert (Abs(radius1 - radius2) < 0.0000001)
' 计算起始和终止角度
Dim startAngle As Double, endAngle As Double
startAngle = ThisDrawing.Utility.AngleFromXAxis(centerpoint, startPoint)
endAngle = ThisDrawing.Utility.AngleFromXAxis(centerpoint, endPoint)
Set AddArcByCenterStartEndPoint = AddArc(centerpoint, radius, startAngle, endAngle)
End Function‘ 这段代码放哪里的?
在click事件中写下
Dim startPoint(0 To 2) As Double, endPoint(0 To 2), centerpoint(0 To 2) As Double
startPoint(0 )=。。。。
。。。。。’'赋值
AddArcByCenterStartEndPoint(centerpoint,startpoint,endpoint)'引 用函数的时候出现红字
请问这是为何 该如何解决?谢谢 |
|