View Full Version : Paperspace Viewports
askrius
2nd Nov 2009, 08:16 pm
Ok, I am missing what is more than likely the most obvious element of this and i am sure it is in the help but I am blind for the time being...
I can access my viewports in paperspace just fine. how do i change their center? I seem to only be able to move the viewport around within the paperspace layout, not move its center point that it is looking at in modelspace...
so i need to make it active first?
Freerefill
2nd Nov 2009, 08:18 pm
Generally you double-click inside the viewport to make it active (you'll know it's active because the border will be bold). From there, it's like you're "reaching into" Modelspace and modifying it, just the same as if you were in the Model tab. Try panning and zooming. If it doesn't work, check to make sure your viewport is not frozen.
David Bethel
2nd Nov 2009, 08:38 pm
Try the commands MSPACE & PSPACE to switch back and forth. -David
askrius
2nd Nov 2009, 08:45 pm
Generally you double-click inside the viewport to make it active (you'll know it's active because the border will be bold). From there, it's like you're "reaching into" Modelspace and modifying it, just the same as if you were in the Model tab. Try panning and zooming. If it doesn't work, check to make sure your viewport is not frozen.
Are you saying that there is no way to programmatically change the point in model space where a paperspace viewport is 'looking'?
for each ent in thisdrawing.paperspace
if typof ent is acadpviewport then
'here is where i would like to zoom each vp to 'extents'
end if
next ent
SEANT
2nd Nov 2009, 09:40 pm
If the API of interest is indeed VBA then this thread'ss post #10 has an example demonstrating a pviewport targeting method.
http://www.cadtutor.net/forum/showthread.php?t=29175
JohnM
2nd Nov 2009, 09:43 pm
is the viewport locked? if so unlock it
Freerefill
2nd Nov 2009, 09:47 pm
I'm not sure about VBA methods, which it looks like what you're using, but here's a way using LISP:
(defun c:chVPT( / vpEnt updPt )
(setq vpEnt (car (entsel)) newPt (getpoint "\nSelect new point: "))
(setq updPt (mapcar '- newPt (cdr (assoc 12 (entget vpEnt)))))
(vla-put-Target (vlax-ename->vla-object vpEnt) (vlax-3D-point updPt))
)
askrius
2nd Nov 2009, 10:59 pm
If the API of interest is indeed VBA then this thread'ss post #10 has an example demonstrating a pviewport targeting method.
http://www.cadtutor.net/forum/showthread.php?t=29175
Thanks. I dont have the time now to read the post in detail but that does indeed seem to be what I am after.
Thank you for not assuming that I had neglected to check if the viewport was locked.
Powered by vBulletin™ Version 4.1.2 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.