Jump to content

Recommended Posts

Posted

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?

Posted

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.

Posted

Try the commands MSPACE & PSPACE to switch back and forth. -David

Posted
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

Posted

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))
 )

Posted
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.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...