wo16 发表于 2005-11-21 22:29:00

请教一选择集合的问题!

<P>acd.Application.Documents.Open (mypath(i))<BR>acd.ActiveDocument.SendCommand "_zoom" &amp; vbCr &amp; "e" &amp; vbCr<BR>Set selec1 = acd.ActiveDocument.SelectionSets.Add("my date1")<BR>selec1.Select acSelectionSetAll<BR>For Each aline In selec1<BR>Select Case aline.Layer<BR>Case "控制线"<BR>point1 = aline.EndPoint<BR>End Select<BR>Next<BR>For k = 0 To 11<BR>Set selec2 = acd.ActiveDocument.SelectionSets.Add("my date2")<BR>selec2.Highlight (True)<BR>pointc1(0) = point1(0) + point2(k, 0)<BR>pointc1(1) = point1(1) + point2(k, 1)<BR>pointc1(2) = point1(2)<BR>pointc2(0) = point1(0) + point3(k, 0)<BR>pointc2(1) = point1(1) + point3(k, 1)<BR>pointc2(2) = point1(2)<BR>Call selec2.Select(acSelectionSetWindow, pointc1, pointc2)<BR>selec2.Highlight (True)<BR>CADdate(i, k) = selec2.Item(0).TextString<BR>selec2.Clear</P>
<P>Next k<BR>acd.ActiveDocument.Close<BR>Next i</P>
<P>我f8一步步看,点pointc1和pointc2的坐标都对的,但就是选不中图形,那为高手指点指点,小弟感激不尽!</P>

雪山飞狐_lzh 发表于 2005-11-22 08:51:00

<P>请贴图说明一下</P>
页: [1]
查看完整版本: 请教一选择集合的问题!