Working with Viewports in a Layout

Viewports (Mviews) created in a layout have unique settings for controlling the appearance of your project’s model. If you control layer visibility, hidden line removal, and model-to-paper space scale, your finished plot can display objects precisely as needed. More importantly, you can control these properties on a viewport-by-viewport basis, even when you have several viewports on a single sheet. The capability to control how your model space project appears through these viewports is a powerful feature.

AutoCAD 2000 introduced a new feature that greatly enhances the usefulness of floating viewports. For example, you can now create non-rectangular viewports. You can also clip a viewport and resize it to any shape by using grips. Additionally, you can lock the display scale of a viewport so it is not accidentally modified when you zoom or pan in the viewport.

This section discusses the differences between tiled viewports and floating viewports and explores using floating viewports in layouts. It also reviews viewport features available with AutoCAD 2002.

Tiled Viewports Versus Floating Viewports

Tiled viewports are created when you are working in model space. Untiled, or floating, viewports are created when you are working in paper space. When you create a viewport, AutoCAD automatically determines the type of viewport to create based on which space you are currently working in. Therefore, tiled viewports are automatically created when the Model tab is active, and floating viewports are automatically created when a Layout tab is active.

Tiled viewports, as the name implies, appear as tiles on the screen. They subdivide the original model space viewport (which is a single tiled viewport) into multiple viewports, as shown in Figure 19.10. They are fixed and cannot be moved. They never overlap, and their edges always lie adjacent to the surrounding viewports. Their usage is primarily for helping to view the model during its creation. The currently selected tile can be further divided into more tiles or joined with another tiled viewport to create a new larger one.

Figure 19.10. Model space viewports subdivide the screen into smaller tiled viewports that cannot overlap.


In contrast, floating viewports neither subdivide the screen nor remain fixed. Additionally, they can be copied, resized, and moved, just like any other AutoCAD object. They can even overlap each other, as shown in Figure 19.11.

Figure 19.11. Paper space viewports can be copied, resized, and can overlap.


The Viewports Toolbar

AutoCAD 2002 provides a toolbar that makes creating viewports very easy. The Viewports toolbar, shown in Figure 19.12, allows you to insert a single viewport, define a polygonal- or non-rectangular viewport, and clip an existing viewport. Additionally, you can set the scale for model space objects displayed in a viewport, and you can display the new Viewports dialog box, which allows you to create multiple viewports by selecting the desired predefined viewport configuration.

Figure 19.12. The Viewports toolbar makes creating viewports very easy.


Tip

To display the Viewports toolbar, right-click over any toolbar button. Then, from the shortcut menu, choose Viewports (see Figure 19.13).

Figure 19.13. You can display the Viewports toolbar by selecting it from the shortcut menu.



Creating Non-Rectangular Floating Viewports

For years, AutoCAD users have dreamed of the day they would be able to create non-rectangular viewports. With the release of AutoCAD 2000, that dream became reality.

The Polygonal Viewport button allows you to create irregularly shaped viewports like the one shown in Figure 19.14.

Figure 19.14. The Polygonal Viewport button allows you to create irregularly shaped floating viewports.


When you choose the Polygonal Viewport button from the Viewports toolbar, AutoCAD prompts you to specify the start point. Then the feature works much like the PLINE command, continuing to prompt for additional points to define the polygon viewport’s vertices. Also similar to the PLINE command, you can switch between a line segment and an arc segment, as well as close the polygon or undo the last point selected. After creating the polygon viewport, you can even edit the pline with several options from the PEDIT command.

Tip

After you create a floating viewport, you can modify its shape by selecting the edge of the viewport to display its grips, selecting the grips, then moving them to new positions.


Caution

If you want to hide the display of a viewport’s boundary, either freeze or turn off the layer on which the viewport is created. However, this may make it more difficult to work with your viewports. It is recommended that you create specific layers on which to place your viewports and then use the No Plot option for those layers to keep them from plotting.


Converting Objects to Floating Viewports

Another handy new feature that comes with AutoCAD 2002 allows you to convert an existing AutoCAD object into a floating viewport. Any closed object such as a circle or a closed polyline can easily be converted to a floating viewport. For example, if you click the Convert Object to Viewport button shown in Figure 19.15, a circle object can be selected and converted into a viewport, as shown in Figure 19.16.

Figure 19.15. The Convert Object to Viewport button allows you to select a closed object and convert it into a floating viewport.


Figure 19.16. This circle has been converted into a floating viewport.


Tip

You can convert a region object to a clipped viewport. By creating composite regions, you can define a region object with holes or voids, which can be used to blank model space areas in the viewport, as shown in Figure 19.17. This is a great way to show notes on top of a viewport. Simply create the composite region in the desired shape, then convert it to a viewport.

Figure 19.17. The viewport, shown in bold, was created from a composite region object, which consists of the irregularly shaped polygon and the circle.



Tip

You can copy a floating viewport object just as you can any other AutoCAD object. This is especially useful for duplicating properties such as the viewport’s scale factor and display area.


Clipping Existing Floating Viewports

AutoCAD 2000 provided a new feature that seemingly clips an existing floating viewport. While the phrase “clip” may conjure visions of AutoCAD’s TRIM command, this feature does not actually clip—or trim—an existing viewport. Instead, it replaces an existing viewport with a new clipped viewport.

What makes this feature useful is that you can replace an existing viewport with a new closed object that assumes the current properties of the existing viewport. So, to quickly revise an existing viewport’s shape while retaining its properties (such as the model’s view position and scale in the viewport), use the new viewport clip feature.

To clip a viewport, click the Clip Existing Viewport button on the Viewports toolbar. AutoCAD then prompts you to select the viewport you want to clip. Next, AutoCAD prompts you to select the clipping object. When you do, AutoCAD converts the clipping object into a viewport and deletes the existing viewport.

The following exercise demonstrates how to create a composite region object and use it to clip an existing viewport.

Exercise 19.3 Clipping Floating Viewports

1.
Open the 19DWG02.DWG drawing file on the accompanying CD. When the drawing opens, it displays a single floating viewport (as shown in Figure 19.18), as well as a polyline and a circle object, both of which are in paper space.

Figure 19.18. The existing viewport, along with the polyline and circle objects.


Next, you convert the polyline and the circle into regions.

2.
From the Draw menu, select Region. AutoCAD prompts you to select the objects to convert into regions.

3.
Select the polyline and the circle, then press Enter. AutoCAD converts the two objects into region objects.

Next, you convert the two region objects into a single composite region.

4.
From the Modify menu, choose Solids Editing > Subtract. AutoCAD prompts you to select the regions to subtract from.

5.
Select the polyline and press Enter. AutoCAD prompts you to select the regions to subtract.

6.
Select the circle and press Enter. AutoCAD subtracts the circle region from the polyline region and creates a single composite region in their place.

Next, you use the composite region object to clip the existing viewport.

7.
Right-click over any toolbar button to display the shortcut menu.

8.
From the shortcut menu, choose Viewports to display the Viewports toolbar.

9.
On the Viewports toolbar, click the Clip Existing Viewport button. AutoCAD prompts you to pick the viewport you want to clip.

10.
Choose the existing viewport, and AutoCAD prompts you to select the clipping object.

11.
Select the composite region. AutoCAD clips the existing boundary, replacing it with the composite region, as shown in Figure 19.19. Notice that the model space view does not display through the circle. This effect is achieved by using composite regions.

Figure 19.19. The existing viewport is clipped by the composite region object.


12.
Close this drawing and do not save.

Controlling a Viewport’s Scale

Another welcome feature introduced with AutoCAD 2000 is the capability to easily scale your model in a floating viewport. In previous releases, to set the proper scale of your model, you had to calculate the viewport’s scale ratio and then use the Zoom XP command. Now you can quickly select the desired scale ratio from the Viewports toolbar.

For example, suppose you are plotting your drawing from a layout, and you are displaying your model in a single floating viewport. If your plotted sheet’s scale must be 1" = 40, you would choose the 1:40 option from the Viewport Scale Control.

Tip

To set a floating viewport’s scale ratio manually, double-click inside the viewport to switch to model space mode, then execute the ZOOM command.At the Command: prompt, type in the scale ratio value followed by XP . For example, to manually set the viewport’s scale ratio to 1" = 40', execute the ZOOM command and type 1/40XP at the Command: prompt.


The Viewport Scale Control comes with more than 30 predefined scale ratios and includes the most common model-to-paper space ratios, as shown in Figure 19.20. To change an existing viewport’s scale, select the viewport, then choose the desired scale ratio from the drop-down list. To set the desired ratio for new viewports as you create them, choose the desired ratio without selecting any objects.

Figure 19.20. The Viewport Scale Control allows you to quickly set the scale for a floating viewport.


Tip

You can double-click inside or outside a viewport to switch between the layout environment and model space.


The Viewports Dialog Box

In the previous section, you learned about the various features of the Viewports toolbar. The only feature not discussed was the Display Viewports Dialog button, shown in Figure 19.21. When you click this button, AutoCAD displays the Viewports dialog box shown in Figure 19.22.

Figure 19.21. Clicking the Display Viewports Dialog button displays the Viewports dialog box.


Figure 19.22. The Viewports dialog box.


The Viewports dialog box allows you to create and edit both tiled and floating viewports. You can select from a list of standard viewport configurations, define new configurations, and assign saved Views to each viewport in a configuration. If you are in the Model tab, you can name a defined configuration and save it for later use.

The Viewports dialog box contains two tabs: the New Viewports tab and the Named Viewports tab. The options displayed in each tab vary depending on whether the Model tab is current or a Layout tab is current. The New Viewports tab (shown in Figure 19.22) shows the options available when the Model tab is current.

When the Model tab is current, the New Viewports tab allows you to select a viewport configuration from the Standard Viewports list and to apply it to the display or insert it into an existing viewport. If you apply the configuration to the display, the Model tab’s current viewport configuration is replaced by the new configuration. If you insert the configuration into an existing viewport, the original viewport configuration is retained, and the new configuration is inserted into the Model tab’s current viewport. You can also indicate whether the configuration is a 2D or a 3D setup. A 2D setup allows you to define each viewport’s view by selecting defined views from the Change View To drop-down list. In contrast, when you select a 3D setup, AutoCAD allows you to define each viewport’s view by selecting from a set of standard orthogonal 3D views in the Change View To drop-down list. After you create the desired viewport configuration, you can name the configuration and save it for later use.

In contrast, when a Layout tab is current, the options available in the New Viewports tab (see Figure 19.23) are slightly different from those available in model space. For example, although you can select a viewport configuration from the Standard viewports list, you can only apply it to the display. You cannot insert it into an existing viewport. However, unlike with tiled viewports created in the Model tab, you can indicate the viewport spacing, which defines the amount of space to apply between viewports when they are created. Additionally, when you insert a new configuration in a layout, AutoCAD allows you to select the location to insert the viewports.

Figure 19.23. These options are available in the New Viewports tab when a Layout tab is current.


Note

You can only create viewport configurations when the Model tab is active. You cannot create viewport configurations when a Layout tab is active.


The Named Viewports tab, shown in Figure 19.24, allows you to select a named viewport configuration to insert. Although named viewports must be created in the Model tab, they can be inserted in either the Model tab or a Layout tab. The options available in the Named Viewports tab are the same for both Model and Layout tabs.

Figure 19.24. The Named Viewports tab allows you to select a named viewport configuration to insert.


Accessing Viewport Commands Through the Shortcut Menu

AutoCAD 2002 allows you to access many commands through the shortcut menu. You access these commands with a right-click, and they are context sensitive. The options displayed on the shortcut menu vary depending on the cursor’s position in the drawing, whether objects are selected, and whether a command is currently in progress. For example, if you are in a Layout tab and a floating viewport is selected, a right-click of your mouse provides the wide selection of options shown in Figure 19.25.

Figure 19.25. When a floating viewport is selected, a right-click of your mouse displays many options, several of which are related to floating viewports.


Among these options, the following three are related to floating viewports:

  • Display Viewport Objects. This option allows you to turn on or off the visibility of objects in a viewport. When it’s turned off, the objects in the viewport are not displayed and will not be plotted.

  • Display Locked. This option allows you to lock the viewport so that its model space scale cannot be altered during zooms and pans. When you turn this option on, any zooms or pans occur in paper space, and not in the viewport, thereby ensuring that the proper model space scale is maintained.

  • Hide Plot. This option allows you to remove hidden lines from objects in floating viewports when they’re plotted. Basically, hidden lines are the lines on the back of 3D objects. When you view a 3D object such as a sphere in wireframe mode, AutoCAD allows you to see the lines in the back of the object, as well as those in the front. In essence, the lines in back of the object show through the object and are not hidden.

    To remove the lines from view, you turn the Hide Plot option on. When the 3D objects in the floating viewport are plotted from the layout, AutoCAD hides any lines in the back of the object so they do not show through. In Figure 19.26, the left viewport has Hide Plot turned off, and the right viewport has Hide Plot turned on. Notice that the hidden lines show through the sphere in the left viewport but are hidden in the right viewport.

    Figure 19.26. When the Hide Plot option is turned on, hidden lines are removed and do not show, as you can see in the sphere on the right.

Note

AutoCAD provides two methods for removing hidden lines. The Hide Objects option found in the Plot Options area of the Plot dialog box removes hidden lines from objects plotted from the Model tab and from objects in a Layout tab that are not displayed in a floating viewport. The Hide Plot feature, however, removes hidden lines only from objects displayed in floating viewports.


Aligning Objects in Floating Viewports

Floating viewports can be edited in several ways. You can use grips to scale, move, or resize viewports. Viewports can be copied or erased. You can even create an array of viewports.

Although creating multiple viewports is easy, aligning objects in different viewports can be difficult unless you take advantage of the MVSETUP command.

The following exercise demonstrates how to use the MVSETUP command to align objects in two different viewports.

Exercise 19.4 Aligning Objects in Two Different Floating Viewports

1.
Open the 19DWG03.DWG drawing file on the accompanying CD.

When the drawing opens, it displays two floating viewports in a layout. Each viewport shows a different view of the same model space objects. It is important to note that both viewports have the same scale.

2.
Type MVSETUP at the Command: prompt, and AutoCAD initializes the MVSETUP routine.

3.
At the Enter an option [Align/Create/Scale viewports/Options/Title block/Undo]: prompt, type A to start the Align feature.

4.
Type H to start the Horizontal feature. AutoCAD prompts for the basepoint. The view in the other viewport will be aligned with this point. If the lower-right viewport is not already highlighted, pick inside it to make it current.

5.
With the lower-right viewport current, use endpoint snap to snap the small rectangle (as shown in Figure 19.27).

Figure 19.27. Align objects in two different viewports using the MVSETUP command. First, snap to the endpoint of an object that appears in both viewports.


6.
When AutoCAD prompts for the other point, pick inside the upper-left viewport to make it current.

7.
With the upper-left viewport current, use endpoint snap to snap the small rectangle as shown in Figure 19.28. AutoCAD moves the view in the upper-left viewport down and aligns the two small rectangles.

Figure 19.28. Finish the MVSETUP command by snapping to the same endpoint of the same object in the other viewport.


8.
Type V to start the Vertical feature. Once again, AutoCAD prompts for the basepoint. Pick inside the lower-right viewport to make it current.

9.
With the lower-right viewport current, use endpoint snap to snap the same small rectangle shown in Figure 19.27.

10.
When AutoCAD prompts for the other point, pick inside the upper-left viewport to make it current.

11.
With the upper-left viewport current, use endpoint snap to snap the same small rectangle shown in Figure 19.28. AutoCAD moves the view in the upper-left viewport to the right and aligns the two small rectangles, as shown in Figure 19.29.

Figure 19.29. The MVSETUP command aligns the objects in the two viewports.


12.
Press Enter twice to end the command.

13.
Close the drawing without saving.

Notice that the MVSETUP command was started in paper space but exited in a model space viewport. Also note that the objects in these two viewports aligned perfectly because the two viewports have the same scale.

Controlling Layer Visibility in Floating Viewports

With floating viewports, you can freeze and thaw layers individually, independent of other viewports. This means you can make a given object in model space invisible in one viewport by freezing its layer, but that object can remain visible in another viewport where its layer is thawed. You can accomplish this within the Layer Properties Manager or by using the VPLAYER command.

The advantage of using the Layer Properties Manager is that you can simply choose the Freeze/Thaw in Current Viewport icon to toggle the layer visibility. The disadvantage to using the Layer Properties Manager is that the settings affect the current viewport only. Consequently, to apply the same layer freeze/thaw properties to multiple viewports, you must select each viewport individually to make it current, and choose the desired settings. The advantage of using the VPLAYER command is that you can apply the desired freeze/thaw settings to multiple viewports simultaneously. However, because VPLAYER does not have a dialog box interface, you must type in the layer names manually.

Caution

Although you can control a layer’s freeze/thaw property in the current viewport, the global freeze/thaw value can override a specified viewport’s setting. If a particular layer is thawed in a viewport but frozen globally, for example, the model space objects on the frozen layer will not appear in any viewport.


The following exercise demonstrates the usefulness of the Layer Properties Manager and the VPLAYER command.

Exercise 19.5 Controlling Layer Visibility in Floating Viewports

1.
Open the 19DWG04.DWG drawing file on the accompanying CD. The drawing opens in Layout1 and displays two floating viewports. At this point, it is obvious that some layers are not visible in the viewport on the right.

Next, you determine which layers are frozen in the viewport on the right.

2.
Click the Layers button on the Object Properties toolbar. The Layer Properties Manager opens, displaying the list of layers (see Figure 19.30). Notice that the icons in the Current VP Freeze column indicate that all layers are thawed. If some right side columns are not visible, simply widen the dialog or shorten the column fields to show items to the right.

Figure 19.30. The Current VP Freeze column indicates all layers are thawed.


3.
Click OK to close the dialog box.

4.
Double-click in the right viewport. AutoCAD switches from paper space to model space, and the right viewport becomes active.

5.
Click the Layers button on the Object Properties toolbar. The Layer Properties Manager opens, displaying the list of layers (see Figure 19.31). Notice that the icons in the Active VP Freeze column indicate that three layers are frozen in the current viewport.

Figure 19.31. The Active VP Freeze column indicates that three layers are frozen in the current viewport.


6.
Click OK to close the dialog box.

7.
Double-click outside of the floating viewports, and AutoCAD switches from model space to paper space.

The next part of this exercise uses the VPLAYER command to list the frozen layers in the two viewports.

8.
Type VPLAYER at the Command: prompt.

9.
Type ? at the Enter an option [?/Freeze/Thaw/Reset/Newfrz/Vpvisdflt]: prompt, and AutoCAD prompts you to select a viewport.

10.
Select the right viewport, and the following information is displayed:

Layers currently frozen in viewport 3: 
"CONTOURS-INDEX" 
"CONTOURS-NORMAL" 
"MODEL_SPACE_BORDERS" 

AutoCAD lists the layers frozen in the selected viewport.

11.
Type ? at the Enter an option [?/Freeze/Thaw/Reset/Newfrz/Vpvisdflt]: prompt.

12.
Choose the left viewport, and you see the following information:

Layers currently frozen in viewport 2: 
"MODEL_SPACE_BORDERS" 

Note

Notice that the VPLAYER command listed the first viewport selected as viewport 3 and the second as viewport 2. Although only two paper space viewports appear in this drawing, the Layout’s view is considered viewport 1.

The next steps use the global freeze/thaw layer settings to set both viewports’ current freeze/thaw layer settings.

13.
Press Enter to end the VPLAYER command.

14.
Click the Layers button on the Object Properties toolbar.

15.
Freeze all the layers except layer 0 in the New VP Freeze column, as shown in Figure 19.32.

Figure 19.32. All the layers except layer 0 are frozen in the New VP Freeze column.


Tip

To view a column’s entire heading, click and drag the line separating column titles to the right until the heading is visible. You can also stretch the dialog box wider to display more information.

16.
Click OK to accept the changes and close the dialog box.

17.
Type VPLAYER at the Enter an option [?/Freeze/Thaw/Reset/Newfrz/Vpvisdflt] prompt.

18.
Type R for reset.

19.
Type * to reset all layers to the current values in the New VP Freeze column.

20.
Type S for Select.

21.
Select the two viewports, then press Enter to end object selection.

22.
Press Enter to end the VPLAYER command. Figure 19.33 shows the end result of this exercise.

Figure 19.33. The Active VP Freeze values for both viewports are automatically set equal to the New VP Freeze column’s current values using the VPLAYER command’s Reset option.


23.
Close the drawing without saving.

The two viewports’ Active VP Freeze values are set equal to the New VP Freeze column’s current values. Consequently, only the road alignment is visible (see Figure 19.33).

Tip

When you need the same Active VP Freeze values in multiple viewports, use the technique of setting the New VP Freeze values to the desired values in the Layer Properties Manager. Then use the VPLAYER’s Reset option to select the viewports and automatically update their Active VP Freeze values.


Note

You might have experienced a problem with retaining changes you made to layer values for xref objects after you closed the drawing and reopened it. If you make changes to the layer values of xrefs and you want those values to be saved with the drawing, set the VISRETAIN system variable to 1. This instructs AutoCAD to save any changes you make to xref-dependent layers with the drawing. This feature is also controlled from the Options dialog box’s Open and Save tab; in the External References area, toggle the Retain Changes to Xref Layers check box.


Warning

Although the VISRETAIN option can be very useful at tweaking a particular xref’s layering appearance, that very capability can lead to problems when you try to update or change a layer property in the xref—and across many drawings. Be sure to document and create a layering plan before taking advantage of the VISRETAIN feature.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.188.138