los_su 发表于 2005-12-12 15:05:00

求助!!着急啊~~

<P>dim a1 as acadline ,a2 as acadlin</P>
<P>a1.offset(100)也相当于acadline</P>
<P>如何让a2=a1.offset(100)??</P>
<P>就是如何让a1偏移出来的这条线覆值给a2??????</P>
<P>请教高手指导!!!!</P>

MJTD_7777 发表于 2005-12-12 16:28:00

Sub main()<BR>Dim Line As AcadLine<BR>Set Line = ThisDrawing.ModelSpace.Item(0)<BR>Line.Offset 100<BR>Dim Line2 As AcadLine<BR>Set Line2 = ThisDrawing.ModelSpace.Item(ThisDrawing.ModelSpace.Count - 1)<BR>End Sub

wyj7485 发表于 2005-12-12 17:10:00

<P>也可:</P>
<P>Dim&nbsp; Line1&nbsp;,&nbsp;Line2 ,OFF</P>
<P>OFF=Line1.Offset (100)</P>
<P>Set&nbsp; Line2 = OFF(0)<BR></P>
<P>&nbsp;</P>

tnt1095 发表于 2005-12-12 17:19:00

<P>一条直线把平面分为2个部分,不同部分的点带入直线要么&gt;0,要么&lt;0,直线上的点带如直线=0,这就可以判断出你向什么方向偏移了</P>

los_su 发表于 2005-12-12 19:40:00

<P>谢谢大家,不过2楼的方法最简单,我也试验了,可以用~~可是我看不懂~~~off(0)是啥意思??</P>
<P>再次请教~</P>
页: [1]
查看完整版本: 求助!!着急啊~~