wangiron
路人甲
路人甲
  • 注册日期2006-07-12
  • 发帖数1
  • QQ
  • 铜币114枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1700回复:0

求助VBA问题 SelectByPolygon?

楼主#
更多 发布于:2006-07-17 14:36
<P>我想通过选择闭合多线段,并选择该多线段里面的注记,但选择不了注记,不知道为什么  代码如下:  </P>
<P> iType0(0) = 0: iData0(0) = "LWPOLYLINE": iType0(1) = 39: iData0(1) = "902"<BR>     mode = acSelectionSetCrossingPolygon<BR>     iType1(0) = 0: iData1(0) = "TEXT": iType1(1) = 8: iData1(1) = "TBH"<BR>     Call DeleteSelects<BR>     Set ssetOply = ThisDrawing.SelectionSets.Add("poly")<BR>     ssetOply.Select acSelectionSetAll, , , iType0, iData0<BR>      MsgBox ssetOply.Count<BR>     For Each Oply In ssetOply<BR>        pnts = Oply.Coordinates<BR>        Pcount = UBound(pnts)<BR>        pc = (Pcount + 1) / 2<BR>        ReDim pta(Pcount + pc) As Double<BR>         g = 0: j = 2<BR>        For i = 0 To Pcount<BR>           If i = j Then<BR>           pta(i) = 0#: j = j + 3: g = g + 1<BR>           Else<BR>               pta(i + g) = pnts(i)<BR>           End If<BR>         Next<BR>         MsgBox pta(11)<BR>         Set ssetText = ThisDrawing.SelectionSets.Add("text")<BR>         <FONT style="BACKGROUND-COLOR: #f70909"> <FONT color=#a0a0a0>ssetText.SelectByPolygon mode, pta, iType1, iData1</FONT></FONT>   ?????</P>
<P>好像是参数pta有问题,请高手指教</P>
喜欢0 评分0
游客

返回顶部