Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AutoCAD 2021 - Split viewports - view operation

11 REPLIES 11
SOLVED
Reply
Message 1 of 12
gideon.botesB4GMB
2112 Views, 11 Replies

AutoCAD 2021 - Split viewports - view operation

Good day everyone,

 

Using 2021. I'm using split screen (side-by-side viewports in model space), but would like to zoom the right-hand viewport based on a window that I define in the left-hand viewport (or vice versa). Is there a way to do this? It would make the split screen feature so much more useful.

 

Apologize if this has been answered before, I tried searching. If so, please send me the link.

 

Thanks!

 

[ The subject line of this post has been edited to include the product name by @handjonathan ]

11 REPLIES 11
Message 2 of 12

@gideon.botesB4GMB ,

 

 


@gideon.botesB4GMB wrote:

... would like to zoom the right-hand viewport based on a window that I define in the left-hand viewport (or vice versa). ...




Please select the "Accept as Solution" button if my post solves your issue or answers your question.


Emilio Valentin
Message 3 of 12

Thank you for responding to my question.

 

While the named viewports are very useful when working in certain situations - like working on a large file with named views for specific angles, this is really not what I am looking for.

 

Working in multiple files would make named viewports counterproductive for what I am trying to achieve. I am looking for a more flexible solution that allows you to quickly navigate with multiple viewports, using an overview as basepoint. While technically that seems the same, creating named views in many multiple files will take a lot of time and I'd be better off just navigating with a single viewport.

Message 4 of 12

@gideon.botesB4GMB ,

 

 


@gideon.botesB4GMB wrote:

 

...quickly navigate with multiple viewports, using an overview as basepoint...

 

I apologize, but your request seems ambiguous - please elaborate further.

 

I suggest you search the Autodesk APP Store or search for a LISP Program.

Maybe the Visual LISP, AutoLISP and General Customization Forum may already have something.

 

 



Please select the "Accept as Solution" button if my post solves your issue or answers your question.


Emilio Valentin
Message 5 of 12

I believe if you want to have such functionality it would have to be programmed, perhaps the people in the customization boards are better suited to help you.

But even then it is not that simple, imagine you have 3 model viewports do you want to be able to activate the zoom in all three of them or only in a single one. Do you wish that the other 2 viewports adjust their view automatically or do you want to select which viewport needs to adjust its view based on your input in another vp. Do you wish the function to detect this behaviour and act based upon mouse inputs or would a command with several follow-up steps be sufficient for this? Or do you want to set up a dedicated 1st-2nd relationship between 2 viewports and have any third viewport be unaffected by your function?

It might also be a great feature to put on the idea boards.  

Unfortunately there are no idea boards for basic autocad, so you could try a site like Augi to get your idea pushed on their wish list or post it to the idea board of another autocad based product (like Civil or Mechanical)

Message 6 of 12

Thank you for the response.

 

Best I can explain it maybe is by analogy. In HTML, before tabs were a thing, you used to get iframes - where, in a browser you have two panes/frames/sub-windows in a given browser window. The left hand side would have links. If you click on the link in the left pane, the right pane would go to the link. In this way, the left was used for navigation, and the right pane was used for the actual results.

 

My idea was, that in AutoCAD, you could maybe do something similar - i.e. do 'window zoom' on the left viewport, instead of the same viewport zooming to that window, the right viewport would go to the view defined by the window you drew in the left window. I hope that makes sense. It's the best way I can explain it.

 

On second thought, I made a little screen capture here to illustrate. Should be clear now.

 

In the end, it just seems you're right - I would have to go for automation as the functionality does not exist. Nothing else to do. I'll take a look at Augi, thanks.

Message 7 of 12

A lateral thought..

You might find that the F7 button (zoom dynamic) does something similar to what you desire but in a single viewport.

Message 8 of 12

That certainly looks like it could be automated with an AutoLisp routine.  Do you always have only two viewports, so that a routine could presumably find the other one, or might you have more, so that it would need you to move into the right one to Zoom in on, yourself?

 

EDIT:  If it's always only 2, and if I am correct that in that case the CVPORT values for them are always 2 and 3, this seems to work, in very limited testing:

 

(defun C:ZOV (/ p1 p2); = Zoom Other Viewport [of only 2 Model-Space Viewports]
  (setvar 'tilemode 1); must be in Model Space
  (setq
    p1 (getpoint "\nCorner of area to Zoom in on in other Viewport: ")
    p2 (getcorner p1 "\nOpposite corner: ")
  ); setq
  (setvar 'cvport (- 5 (getvar 'cvport))); move into other Viewport
  (command "_.zoom" "_non" p1 "_non" p2)
  (princ)
)

 

There may be a way to check whether there are only 2, but if more than that, what should it do?

Kent Cooper, AIA
Message 9 of 12
Kent1Cooper
in reply to: peter_thomson


@peter_thomson wrote:

... the F7 button (zoom dynamic) ....


???  F7 toggles the grid [by default, that is, unless you've forced a different meaning on it].

Kent Cooper, AIA
Message 10 of 12

I stand humbled by your presence, oh Wise Wielder of LISP.

 

Just kidding.

 

However, @Kent1Cooper, I really am impressed. This was exactly what I needed, and will be very useful when I work on large layouts, where I want to keep track of the overview while working on the details. I hope it didn't take you too long to write.

 

I think the feature to check for more than two viewports is unneeded. A mere luxury of a variable that I can easily control.

 

Thank you for helping out!

Tags (1)
Message 11 of 12

While Kent is right - F7 switches the grid - I like this type of thinking. You're right, Zoom Dynamic does what I want, perhaps that is a possible approach to coding it. Thanks for your post!

Message 12 of 12

Hi there,
That was an oops moment. In the olden days, F7 key was zoom dynamic. They changed it on me and I didn't notice because I just use the mouse wheel these days.
Here is my "lateral" simple solution based on using Zoom Dynamic..
The simple lisp below (saved in a file called ZOOM DYNAMIC.LSP) if added to your acaddoc.lsp file defines a command "ZZ" that does this. This way it is always available for you.
You would add a line like this to your acaddoc.lsp
(load C:/mylisp/zoom dynamic.lsp) where C:/mylisp is the folder path to your zoom dynamic.lsp file..
To use zoom dynamic quickly with this, you would
type zz
right-click (for enter)
(optionally)...left click to resize the zoom view rectangle, then
reposition the dynamic zoom view and right click.
This will give you the zoomed view you desire all in one viewport.

(defun C:ZZ (/ )
(command "zoom" "dynamic")
);d


Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report