无效的过程调用或参数
<p>Sub cccc() '测试函数<br/>'Private Type Point '三维点<br/> ' X As Single<br/> ' Y As Single<br/> 'H As Single<br/>'End Type</p><p>'Dim sqm() As Double<br/>Dim line As AcadLine<br/>Dim s(0 To 2) As Double<br/>'Dim e(0 To 2) As Double<br/>Dim s1() As Variant<br/>Dim e1() As Variant<br/>Dim x As Variant<br/>Dim y As Variant<br/>Dim h As Variant<br/>Dim PI As Double</p><p>PI = 3.1415926</p><p> Dim d As Double<br/> Dim t As Double<br/> Dim l As Double<br/> Dim r As Double<br/> Dim d1 As Double<br/> Dim e As Double<br/> Dim f As Double<br/> Dim m As Double<br/> Dim n2 As Double<br/> Dim n As Double<br/> Dim c1 As Double<br/> Dim c2 As Double<br/> Dim c3 As Double<br/> Dim c4 As Double<br/> Dim c5 As Double<br/> Dim c As Double<br/> Dim a As Double<br/> Dim b As Double<br/> <br/> Dim DD As Double<br/> Dim g As Double<br/> Dim m1 As Double<br/> Dim n1 As Double<br/> Dim w As Double<br/> Dim p As Double<br/> Dim q As Double<br/> 'Dim sqm1 As Variant<br/> Dim sqm1(0 To 2) As Double<br/> Dim sqm(0 To 2) As Double<br/> <br/> x = 144.005: y = -14: h = 1076<br/> a = 29: b = 2<br/> c4 = (a - b) ^ (1 / 3)<br/> c5 = 1 / 3<br/> <br/> If h <= 965 Then<br/> d = h - 950.5<br/> t = 73.125 - 0.049 * d<br/> l = 34.94 + 3.7538 * d<br/> r = 176.262 + 0.2225 * d<br/> 'GoTo zbjs<br/> ElseIf h <= 975 Then<br/> d = h - 970<br/> t = 72.207 + 0.0586 * d<br/> l = 96.186 + 1.3628 * d<br/> r = 180.601 + 0.2224 * d<br/> 'GoTo zbjs<br/> ElseIf h <= 990 Then<br/> d = h - 975<br/> t = 72.5 - 0.0086 * d<br/> l = 103 + 1.4 * d<br/> r = 181.713 + 0.2225 * d<br/> ' GoTo zbjs<br/> ElseIf h <= 1010 Then<br/> d = h - 990<br/> t = 72.371 - 0.0086 * d<br/> l = 124 + 1.4 * d<br/> r = 185.05 + 0.2225 * d<br/> ' GoTo zbjs<br/> ElseIf h <= 1030 Then<br/> d = h - 1010<br/> t = 72.2 - 0.105 * d<br/> l = 152 + 1.1125 * d<br/> r = 189.5 + 0.245 * d<br/> 'GoTo zbjs<br/> ElseIf h <= 1050 Then<br/> d = h - 1030<br/> t = 70.1 - 0.105 * d<br/> l = 174.25 + 1.1125 * d<br/> r = 194.4 + 0.345 * d<br/> ' GoTo zbjs<br/> ElseIf h <= 1070 Then<br/> d = h - 1050<br/> t = 68 - 0.145 * d<br/> l = 196.5 + 0.8375 * d<br/> r = 201.3 + 0.5769 * d<br/> ' GoTo zbjs<br/> ElseIf h <= 1090 Then<br/> d = h - 1070<br/> t = 65.1 - 0.145 * d<br/> l = 213.25 + 1.1375 * d<br/> r = 212.839 + 0.8769 * d<br/> <br/> GoTo zbjs<br/> ElseIf h <= 1110 Then<br/> d = h - 1090<br/> t = 62.2 - 0.215 * d<br/> l = 236 + 1.225 * d<br/> r = 230.377 + 1.27965 * d<br/> 'GoTo zbjs<br/> ElseIf h <= 1130 Then<br/> d = h - 1110<br/> t = 57.9 - 0.215 * d<br/> l = 260.5 + 1.225 * d<br/> r = 255.97 + 1.3297 * d<br/> ' GoTo zbjs<br/> ElseIf h <= 1150 Then<br/> d = h - 1130<br/> t = 53.6 - 0.24 * d<br/> l = 285 + 1.175 * d<br/> r = 282.564 + 1.3258 * d<br/> ' GoTo zbjs<br/> ElseIf h <= 1170 Then<br/> d = h - 1150<br/> t = 48.8 - 0.24 * d<br/> l = 308.5 + 1.375 * d<br/> r = 309.08 + 1.7259 * d<br/> ' GoTo zbjs<br/> ElseIf h <= 1190 Then<br/> d = h - 1170<br/> t = 44 - 0.3375 * d<br/> l = 336 + 1.073 * d<br/> r = 343.597 + 1.5823 * d<br/> ' GoTo zbjs<br/> ElseIf h <= 1210 Then<br/> d = h - 1190<br/> t = 37.25 - 0.3375 * d<br/> l = 357.46 + 1.073 * d<br/> r = 375.243 + 1.7824 * d<br/> ' GoTo zbjs<br/> ElseIf h <= 1230 Then<br/> d = h - 1210<br/> t = 30.5 - 0.4143 * d<br/> l = 378.92 + 0.588 * d<br/> r = 410.89 + 1.6983 * d<br/> ' GoTo zbjs<br/> ElseIf h <= 1245 Then<br/> d = h - 1230<br/> t = 22.214 - 0.4143 * d<br/> l = 390.68 + 0.588 * d<br/> r = 444.856 + 1.9316 * d<br/> 'GoTo zbjs<br/> End If<br/> <br/>zbjs: d1 = 1245 - h</p><p> e = 6 - 0.40342 * d1 + 1.20744 * d1 ^ 2 / 10 ^ 3 + 2.78123 * d1 ^ 3 / 10 ^ 7<br/> <br/> f = 12 + 0.440058 * d1 - 1.16241 * d1 ^ 2 / 10 ^ 3 + 1.2662856 * d1 ^ 3 / 10 ^ 6<br/> <br/> m = -(r ^ 2 * x)<br/> <br/> n2 = e + r - y<br/> <br/> n = 2 * r * n2 / 3<br/> <br/> c1 = Sqr(m ^ 2 + n ^ 3)<br/> <br/> c2 = (c1 - m) ^ 1/3 <br/> c3 = (-c1 - m) ^ 1 / 3<br/> <br/> c = c2 + c3<br/> <br/> DD = e + (1 / 2) * c ^ 2 / r<br/> <br/> g = Atn(c / r) '* 180 / pi<br/> <br/> m1 = (0.5 * l * (Sqr(r ^ 2 + l ^ 2)) + 0.5 * r ^ 2 * Log(l + Sqr(r ^ 2 + l ^ 2)) - 0.5 * r ^ 2 * Log(r)) / r<br/> <br/> n1 = (0.5 * c * (Sqr(r ^ 2 + c ^ 2)) + 0.5 * r ^ 2 * Log(c + Sqr(r ^ 2 + c ^ 2)) - 0.5 * r ^ 2 * Log(r)) / r<br/> <br/> w = f + (t - f) * (n1 / m1) ^ 2.2<br/> <br/> p = c + 0.5 * w * Sin(g)<br/> <br/> q = DD - 0.5 * w * Cos(g)<br/> <br/> MsgBox c2<br/> <br/> MsgBox "x=" & p & " y= " & q<br/> <br/> <br/> End Sub</p><p>其中的C2值c2 = (c1 - m) ^ 1/3 提示没问题,但算出来是(c1 - m)/3的结果,若变成c2 = (c1 - m) ^ (1/3),老提示无效的过程调用或参数. </p><p>在这里请教各位高手,先行感谢</p>
页:
[1]