askrius Posted November 2, 2009 Posted November 2, 2009 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? Quote
Freerefill Posted November 2, 2009 Posted November 2, 2009 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. Quote
David Bethel Posted November 2, 2009 Posted November 2, 2009 Try the commands MSPACE & PSPACE to switch back and forth. -David Quote
askrius Posted November 2, 2009 Author Posted November 2, 2009 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 Quote
SEANT Posted November 2, 2009 Posted November 2, 2009 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 Quote
Freerefill Posted November 2, 2009 Posted November 2, 2009 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)) ) Quote
askrius Posted November 2, 2009 Author Posted November 2, 2009 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. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.