wangiron 发表于 2006-7-17 14:41:00

求助 VBA的 SelectByPolygon??

<P>我想通过选择闭合多线段,并选择该多线段里面的注记,但选择不了注记,不知道为什么&nbsp; 代码如下:&nbsp; </P>
<P>&nbsp;iType0(0) = 0: iData0(0) = "LWPOLYLINE": iType0(1) = 39: iData0(1) = "902"<BR>&nbsp;&nbsp;&nbsp;&nbsp; mode = acSelectionSetCrossingPolygon<BR>&nbsp;&nbsp;&nbsp;&nbsp; iType1(0) = 0: iData1(0) = "TEXT": iType1(1) = 8: iData1(1) = "TBH"<BR>&nbsp;&nbsp;&nbsp;&nbsp; Call DeleteSelects<BR>&nbsp;&nbsp;&nbsp;&nbsp; Set ssetOply = ThisDrawing.SelectionSets.Add("poly")<BR>&nbsp;&nbsp;&nbsp;&nbsp; ssetOply.Select acSelectionSetAll, , , iType0, iData0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MsgBox ssetOply.Count<BR>&nbsp;&nbsp;&nbsp;&nbsp; For Each Oply In ssetOply<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pnts = Oply.Coordinates<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Pcount = UBound(pnts)<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For i = 0 To Pcount<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pta(i ) = pnts(i)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Next<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set ssetText = ThisDrawing.SelectionSets.Add("text")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT style="BACKGROUND-COLOR: #f70909"> <FONT color=#a0a0a0>ssetText.SelectByPolygon mode, pta, iType1, iData1</FONT></FONT>&nbsp;&nbsp; ?????</P>
<P>好像是参数pta有问题,请高手指教</P>
页: [1]
查看完整版本: 求助 VBA的 SelectByPolygon??