hecco 发表于 2009-12-16 12:26:00

[求助]关于断面面积

<p>Pt(0) = 0: Pt(1) = (HS + h10(i)) / 2 + (i - 1) * ucs<br/>&nbsp;&nbsp;&nbsp;&nbsp; ThisDrawing.SendCommand "-Boundary" &amp; vbCr &amp; Pt(0) &amp; "," &amp; Pt(1) &amp; vbCr &amp; vbCr<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set lwpLineObj = ThisDrawing.ModelSpace.Item(ThisDrawing.ModelSpace.Count - 1)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; S = lwpLineObj.Area<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lwpLineObj.Delete<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '写面积<br/>&nbsp;&nbsp;&nbsp; PMJ(0) = 4: PMJ(1) = -6 + h10(i) + (i - 1) * ucs: PMJ(2) = 0<br/>&nbsp;&nbsp;&nbsp; hMJ = 0.6<br/>&nbsp;&nbsp;&nbsp; deltah = h10(i) - HS<br/>&nbsp;&nbsp;&nbsp; If deltah &gt; 0 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Aw = Format(deltah, "0.000"): mtextmj = "Aw=" &amp; S<br/>&nbsp;&nbsp;&nbsp; ElseIf deltah &lt; 0 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; At = Format(Abs(deltah), "0.000"): mtextmj = "At=" &amp; S<br/>&nbsp;&nbsp;&nbsp; End If<br/>&nbsp;&nbsp;&nbsp;&nbsp; ThisDrawing.ActiveLayer = courtlay4<br/>&nbsp;&nbsp;&nbsp; Set mjtext = ThisDrawing.ModelSpace.AddText(mtextmj, PMJ, hMJ)<br/>&nbsp;&nbsp;&nbsp;&nbsp; Next i</p><p>绘制横断面,面积是借用网上的,对某些部分不理解</p><p>逐行运行都可以的,总体运行就出错:</p><p>1、多段线并不删除</p><p>2、没有显示需要的数据,都是0</p><p>请各位指教!</p>

hecco 发表于 2009-12-22 11:36:00

<p>咋没人回答啊,我自己解决了。</p><p>1、用regen</p><p>2、用zoomwindow</p>
页: [1]
查看完整版本: [求助]关于断面面积