vb 方法和数据成员找不到

来源:百度知道 编辑:UC知道 时间:2024/05/05 09:33:11
Public Function addcircleby2point(ByVal startpoint As Variant, ByVal endpoint As Variant) As AcadCircle
Debug.Assert (VarType(startpoint) = vbArray + vbDouble)
Debug.Assert (VarType(endpoint) = vbArray + vbDouble)
'计算圆心和半径
Dim centerpoint As Variant, radius As Double
centerpoint = math.getmiddlepointbetween2point(startpoint, endpoint).......问题所在地方
radius = math.getdistancebetween2point(startpoint, endpoint) / 2
Set addcircleby2point = addcircle(centerpoint, radius)
End Function
Public Function getmiddlepointbetween2point(ByVal startpoint As Variant, ByVal endpoint As Variant) As Variant
Dim midpoint(0 To 2) As Double
midpoint(0) = (startpoint(0) + endpoint(0)) / 2
midpoint(1) = (startpoint(1) + endpoint(1)) / 2
midpoint(2) = (startpoint(0) + endpoint(2)) / 2
getmiddlepointbetween2point = midpoint
End Function

centerpoint = math.getmiddlepointbetween2point(startpoint, endpoint).......问题所在地方

是不是在同一个工程中, 为什么要加math呢?这个是自已定义的不需要再加这个math的

startpoint, endpoint两个变量没定义