Author Topic: Cycling through Named Views  (Read 3382 times)

0 Members and 1 Guest are viewing this topic.

Dimas

  • Guest
Cycling through Named Views
« on: February 21, 2006, 11:58:15 PM »
Cycling through Named Views.
How can it be done?

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Cycling through Named Views
« Reply #1 on: February 22, 2006, 12:21:19 AM »
I'm not a VB'er, but ...
Have you tried Iterating the Views Collection

If you want to 'SEE" each view, look at the SetView Method associated with the Active Viewport.

kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Dave R

  • Guest
Re: Cycling through Named Views
« Reply #2 on: February 22, 2006, 08:10:23 AM »
Just a wild guess... :wink:
Code: [Select]
Sub IterateViews()
  Dim oView As AcadView
  For Each oView In ThisDrawing.Views
    'do something
  Next oView
End Sub

Cycling through Named Views.
How can it be done?

Dimas

  • Guest
Re: Cycling through Named Views
« Reply #3 on: February 25, 2006, 05:34:52 PM »
Just a wild guess... :wink:
...

Thanx. will try. Think should work)))

Dimas

  • Guest
Re: Cycling through Named Views
« Reply #4 on: February 25, 2006, 06:16:21 PM »
Then the other question))
How do I find which view is current?

Dnereb

  • Guest
Re: Cycling through Named Views
« Reply #5 on: February 27, 2006, 04:38:07 AM »
How about Document.Activeviewport.

Bob Wahr

  • Guest
Re: Cycling through Named Views
« Reply #6 on: March 10, 2006, 06:42:35 PM »
Code: [Select]
Sub test()
Dim objView As AcadView
Dim objVP As AcadViewport
Dim objViews As AcadViews
Set objViews = ThisDrawing.Views
Set objVP = ThisDrawing.ActiveViewport
For Each objView In objViews
  If objView.Center(0) = objVP.Center(0) And objView.Center(1) = objVP.Center(1) And objView.Height = objVP.Height And objView.Width = objVP.Width Then
    Debug.Print "yep"
    Exit For
  End If
Next objView
End Sub