Тема: Информация из штампа по листам
Здравствуйте знатоки!!
Подскажите пожалуйста! вставляется блок штампа на каждый лист, мне нужно считать инфу из штампа с каждого листа
Dim oSset As AcadSelectionSet Dim oEnt As AcadEntity Dim blkRef As AcadBlockReference Dim oAtt As AcadAttributeReference Dim attArr() As AcadAttributeReference Dim attVal1 As String Dim attVal2 As String Dim dxfcode(0 To 1) As Integer Dim dxfdata(0 To 1) As Variant dxfcode(0) = 0 dxfdata(0) = "INS ERT" dxfcode(1) = 2 dxfdata(1) = "Øòàìï" & ",`*U*" Dim LayoutName As String For i = 0 To pages_count - 1 LayoutName = namelayotArray(i) For k = 0 To pages_count - 1 '********* ' LayoutName = ThisDrawing.ActiveLayout.name Dim setName As String, j As Integer Dim hgt As Double, scl As Double hgt = ThisDrawing.GetVariable("DIMTXT") hgt = hgt * 0.0001 setName = "$Blocks$" 'ThisDrawing.ActiveLayout (iD) 'Make sure selection set does not exist For j = 0 To ThisDrawing.SelectionSets.count - 1 If ThisDrawing.SelectionSets.Item(j).name = setName Then ThisDrawing.SelectionSets.Item(j).Delete Exit For End If Next j ' select all blocks Set oSset = ThisDrawing.SelectionSets.Add(setName) oSset.Select acSelectionSetAll, , , dxfcode, dxfdata ThisDrawing.Utility.Prompt "Selected: " & oSset.count & " blocks" 'Process each block instance For Each oEnt In oSset Dim iD As Long iD = oEnt.OwnerID Dim oLayObj As AcadObject Set oLayObj = ThisDrawing.ObjectIdToObject(iD) Dim objLt As AcadLayout Set objLt = oLayObj.Layout ' Dim oLayout As AcadBlock Set oLayout = oLayObj Set blkRef = oEnt Dim pt As Variant pt = blkRef.InsertionPoint attArr = blkRef.GetAttributes For j = 0 To UBound(attArr) Set oAtt = attArr(j) Select Case oAtt.TagString Case "CELL5_7" NlayotArray(k) = oAtt.TextString End Select Next j Next ' End If Next Next oSset.Delete Se t oSset = Nothing End Sub
в данном коде считывает только с активного листа, мне нужно со всех листов чертежа, где есть блок штампа