Collecting PViewports
Hi all,I have a drawing with several Pviewports, devided over a number of Layout-tabs. I'm trying to collect ALL the existing Pvieports through a VB(A) routine.Using a selectionset and the select method I can select all Pviewports of one single tab (the 'active paperspace')To get all pvieports I have to cycle through all layout tabs.Maybe it's pretty straight forward, but how do I active the next layout tab through VB(A)? (Like clicking the layout tab with the mouse)TIAArno van EeuwenRotterdam, The Netherlands
Comments
-
This loop almost does what I want but I only see Paper_space0 , Paper_space1 etc in the Msgbox.If a layout is the active paperspace, it's blockname should be 'paperspace'.Where is the finishing touch?Private Sub CycleLayouts() Dim Paperspace As IntelliCAD.Paperspace Dim Block As IntelliCAD.Block For Each Block In IntelliCAD.ActiveDocument.Blocks If Block.IsLayout Then IntelliCAD.ActiveDocument.ActiveLayout = IntelliCAD.ActiveDocument.Layouts.Item(Block.Layout.Name) IntelliCAD.Update MsgBox Block.Name, , IntelliCAD.ActiveDocument.ActiveLayout.Name End If Next End End SubArno van Eeuwen
0 -
Ok, pretty simple after all.Following loop does the trick, it cycles through layouts; it only doesn't show in the tabs at the lower ends....Arno van EeuwenPrivate Sub CycleLayouts() Dim Layout As IntelliCAD.Layout For Each Layout In IntelliCAD.ActiveDocument.Layouts IntelliCAD.ActiveDocument.ActiveLayout = Layout IntelliCAD.Update MsgBox IntelliCAD.ActiveDocument.ActiveLayout.Name, , "activated" Next EndEnd Sub
0