Search & Replace attributes including paperspace?
I have a number of paperspace layouts, each with its own titleblock. I want to change the revision dates on all of them.There are a few methods I can use for blocks in modelspace, but these methods seem to ignore paperspace objects. Am I missing something?Any ideas?Joe Dunfee
Comments
-
Joe,following code (VBA V7) will cicle through all layouts (PS) and counts a certain block insert.Mind the code 67 in the filter settings.Hope this helps,Arno van EeuwenOption ExplicitPublic Sub Main() Dim SingleLayout As Layout Dim FilterType(0 To 2) As Integer Dim FilterData(0 To 2) As Variant Dim Sset As IntelliCAD.SelectionSet FilterType(0) = 0: FilterData(0) = "INSERT" FilterType(1) = 2: FilterData(1) = "MICKEY" '<<<<- Your blockname here FilterType(2) = 67: FilterData(2) = 1 '<<<<- Paperspace = 1 (Modelspace = 0) On Local Error Resume Next IntelliCAD.ActiveDocument.SelectionSets.Item("Temp").Delete On Local Error GoTo 0 Set Sset = IntelliCAD.ActiveDocument.SelectionSets.Add("Temp") For Each SingleLayout In IntelliCAD.ActiveDocument.Layouts 'Here you switch through 'each' paperspace IntelliCAD.ActiveDocument.ActiveLayout = SingleLayout Sset.Select vicSelectionSetAll, , , FilterType, FilterData MsgBox Format(Sset.Count) Sset.Clear Next End Sub
0 -
Thank you Arno. I figgured it was going to require some VBA or Lisp to do it.But, I imagine it might be possible to search the entire drawing database for blocks with attributes, and not consider whether it is in paperspace or modelspace. It should even be easier to do.Joe Dunfee
0 -
Just keep it mind:Modelspace and Paperspace themselves are seperate blocks. In case of breaking news: please keep us posted!;-)Arno
0 -
Arno, thank you very much for the heads-up on the layout/block thing. This is not something I would have expected. I would have wasted a lot of time trying to figgure out why my routine was excluding paperspace objects.Joe Dunfee
0