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