“参数不可选”?
Public Function CalcPoint(ByVal ZMatr As Integer, _ByRef minedBlock() As Integer) As AcadDictionary
Dim XMatr, YMatr As Integer
Dim ptDict As AcadDictionary
XMatr = UBound(minedBlock) - 1
.......
.......
Set CalcPoint = ptDict
End Function
Public Sub DrawOpenPit()
Dim XMatr, YMatr, ZMatr
Dim ptOpenPit As AcadDictionary
Dim minedBlock(47, 29, 25) As Integer
.......
ptOpenPit = CalcPoint(0, minedBlock(47, 29, 25))
.........
End Sub
为什么我一编译的时候,就说 “参数不可选”? Public Function CalcPoint(ByVal ZMatr As Integer, _
ByRef a As Variant) As AcadDictionary
Dim XMatr, YMatr As Integer
Dim ptDict As AcadDictionary
XMatr = UBound(a) - 1
Set CalcPoint = ptDict
End Function
Public Sub DrawOpenPit()
Dim XMatr, YMatr, ZMatr
Dim ptOpenPit As AcadDictionary
Dim minedBlock(0 To 2) As Integer
minedBlock(0) = 47: minedBlock(1) = 29: minedBlock(2) = 25
Dim b As Variant
b = minedBlock
Set ptOpenPit = CalcPoint(0, b)
End Sub ptOpenPit = CalcPoint(0, minedBlock(47, 29, 25) -》
ptOpenPit = CalcPoint(0, minedBlock)
Public function CalcPoint(ByVal ZMatr As Integer, _
ByRef minedBlock() As Integer) As AcadDictionary
-》
Public function CalcPoint(ByVal ZMatr As Integer, _
ByRef minedBlock) As AcadDictionary
页:
[1]