Author Topic: How do I move a modelspace view in a viewport?  (Read 2316 times)

0 Members and 1 Guest are viewing this topic.

commodore

  • Newt
  • Posts: 51
How do I move a modelspace view in a viewport?
« on: October 24, 2008, 07:44:15 AM »
VB newbie, using MEP 2007 (ADT)
I've attached the relevent portion of my code but here's a summary of what I'm trying to do.
My Mspace contains a Xref that has named views and I have found the named view I want and the Center, Target, Height and Width of the named view. I then go to Pspace, create a viewport, and do a zoom extents, this brings the objects in Mspace into the viewport but then I scale the viewport to 7/32" = 1' and the Mspace objects move out of the viewport to the left. I can click and drag the view back to the center but  I cant figure out how to do this with VB. My work around was to re-created the named view in Mspace and do a sendcommand > view > restore in Pspace but it seems that since I know the center of the named view in Mspace and I know the center of the viewport in Pspace that I should be able to line these up.
How do I move a Mspace view in a Pspace viewport?
I'm new to VB so an example would be helpful.

Alan Cullen

  • Guest
Re: How do I move a modelspace view in a viewport?
« Reply #1 on: October 24, 2008, 08:09:31 AM »
Dunno....my first thought would be not to use a centre point of the view, but a specific point, e.g. a corner point, a known object point.

Okay...I'll leave now....*puts tail between legs and goes to burrow*

Bryco

  • Water Moccasin
  • Posts: 1883
Re: How do I move a modelspace view in a viewport?
« Reply #2 on: October 24, 2008, 10:29:47 AM »
zoomcenter

commodore

  • Newt
  • Posts: 51
Re: How do I move a modelspace view in a viewport?
« Reply #3 on: October 24, 2008, 10:37:02 AM »
zoomcenter

That would be another "sendcommand" method or is there a VB equivalent?

NM, found it
object.ZoomCenter

Thanks
« Last Edit: October 24, 2008, 11:31:20 AM by commodore »