[求助]如何获取PL线offset之后的面积?
<p class="MsoNormal" style="margin: 0cm="0cm"0cm="0cm"0pt; text-align: left;" align="left">SubCh4_OffsetPolyline()</p>
<p class="MsoNormal" style="margin: 0cm="0cm"0cm="0cm"0pt; text-align: left;" align="left"><span style=""> ' </span>创建多段线</p>
<p class="MsoNormal" style="margin: 0cm="0cm"0cm="0cm"0pt; text-align: left;" align="left"><span style=""> Dim plineObj As
AcadLWPolyline</span></p>
<p class="MsoNormal" style="margin: 0cm="0cm"0cm="0cm"0pt; text-align: left;" align="left"><span style=""> Dim points(0 To 11) As
Double</span></p>
<p class="MsoNormal" style="margin: 0cm="0cm"0cm="0cm"0pt; text-align: left;" align="left"><span style=""> points(0) = 1: points(1) =
1</span></p>
<p class="MsoNormal" style="margin: 0cm="0cm"0cm="0cm"0pt; text-align: left;" align="left"><span style=""> points(2) = 1: points(3) =
2</span></p>
<p class="MsoNormal" style="margin: 0cm="0cm"0cm="0cm"0pt; text-align: left;" align="left"><span style=""> points(4) = 2: points(5) =
2</span></p>
<p class="MsoNormal" style="margin: 0cm="0cm"0cm="0cm"0pt; text-align: left;" align="left"><span style=""> points(6) = 3: points(7) =
2</span></p>
<p class="MsoNormal" style="margin: 0cm="0cm"0cm="0cm"0pt; text-align: left;" align="left"><span style=""> points(8) = 4: points(9) =
4</span></p>
<p class="MsoNormal" style="margin: 0cm="0cm"0cm="0cm"0pt; text-align: left;" align="left"><span style=""> points(10) = 4: points(11) =
1</span></p>
<p class="MsoNormal" style="margin: 0cm="0cm"0cm="0cm"0pt; text-align: left;" align="left"><span style=""> Set plineObj = ThisDrawing.ModelSpace.
_</span></p>
<p class="MsoNormal" style="margin: 0cm="0cm"0cm="0cm"0pt; text-align: left;" align="left"><span style="">
AddLightWeightPolyline(points)</span></p>
<p class="MsoNormal" style="margin: 0cm="0cm"0cm="0cm"0pt; text-align: left;" align="left"><span style=""> plineObj.Closed =
True</span></p>
<p class="MsoNormal" style="margin: 0cm="0cm"0cm="0cm"0pt; text-align: left;" align="left"><span style=""> ZoomAll</span></p>
<p class="MsoNormal" style="margin: 0cm="0cm"0cm="0cm"0pt; text-align: left;" align="left"><span style=""> </span></p>
<p class="MsoNormal" style="margin: 0cm="0cm"0cm="0cm"0pt; text-align: left;" align="left"><span style=""> ' </span>偏移多段线</p>
<p class="MsoNormal" style="margin: 0cm="0cm"0cm="0cm"0pt; text-align: left;" align="left"><span style=""> Dim offsetObj As
Variant</span></p>
<p class="MsoNormal" style="margin: 0cm="0cm"0cm="0cm"0pt; text-align: left;" align="left"><span style=""> offsetObj = plineObj.<font style="background-color: rgb(49, 106, 197);" color="#ffffff">Offset</font>(0.25)</span></p>
<p class="MsoNormal" style="margin: 0cm="0cm"0cm="0cm"0pt; text-align: left;" align="left">ZoomAll</p>
<p class="MsoNormal" style="margin: 0cm="0cm"0cm="0cm"0pt; text-align: left;" align="left">End
Sub</p><p class="MsoNormal" style="margin: 0cm="0cm"0cm="0cm"0pt; text-align: left;" align="left"><br/></p><p class="MsoNormal" style="margin: 0cm="0cm"0cm="0cm"0pt; text-align: left;" align="left"><br/></p><p class="MsoNormal" style="margin: 0cm="0cm"0cm="0cm"0pt; text-align: left;" align="left">只找到这样的代码,但如何获得偏移之后的面积呢?请各位前辈指点一下<br/></p>
页:
[1]