Shaped Viewports

by Will on September 28, 2011

Here’s a quick tip for today.

No doubt you’re aware that you can have custom shaped viewports – select a viewport, right click, and choose the option to clip the viewport based on a bounding object such as a polyline.

While this can be useful, be careful on drawings that contain a lot of information. There’s a reason rectangular ones are the default. Rectangles are easy for a computer to deal with. They have a set width and height, and it is easy to know what should and should not be displayed through the viewport.

Polygonal viewports are different – your computer has to mathematically determine what should and should not be displayed, and that is much more difficult to figure out for odd-shaped viewports. Incidentally, if you’re interested in how this might be done take a look at my ray casting algorithm for AutoCAD.

Therefore, where possible, try to stick to rectangular ones. That doesn’t mean use rectangular ones at all costs, just be aware that if you have a busy drawing (like a survey) and view it through a polygonal viewport, you’re in for some rendering lag!

Hope this helps,


Enter Your Mail Address

Be Sociable, Share!


neil jones September 28, 2011 at 8:52 am

How do I get the Ray casting algorithm to run??

Will September 28, 2011 at 9:32 am

Open the VBA editor using VBA IDE and paste it into a new module. Then run it using VBARUN.

Jigar November 28, 2011 at 12:27 pm

How do we get the layout view rotated?

Will November 30, 2011 at 10:24 am

You’ll be looking to manipulate the UCS. Each viewport has its own UCS. Simply double click into the viewport, and type UCS to edit the UCS of the viewport. Rotate it to the desired orientation and then type PLAN, and select the option to use the current UCS.

Comments on this entry are closed.

Previous post:

Next post: