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