select only what you need with filters

16
Volume 15, Number 1 • January 2007 www.elijournals.com ® In This Issue: Programming Techniques Create effective dialog boxes for your AutoLISP routines, part 1: Introduction to DCL LDT & Civil 3D Extend the power of Land Desktop with Civil 3D ADT & Revit Easily generate slab objects for floors and ceilings Q&A Prevent unwanted zoom changes in a viewport Create legible image tiles 2004/2005/2006/2007) AutoCAD AutoCAD Select only what you need with filters By Darren Young Application: Autodesk AutoCAD 2004/2005/2006/ 2007 T he key to working efficiently in AutoCAD is organization. However, even with lay- ers, dimension styles, text styles, and so on, your drawing can still become large and unmanageable due to the sheer volume of information it contains. At times like this, it’s often a slow process to select the objects you need to edit. Luckily, AutoCAD has some great tools to help you out in these situations. In this article, you’ll learn how to use filters to quickly select objects in your drawing without having to select them one at a time. Selection filters new and old First, you’ll learn about AutoCAD’s new- est selection filtering method, the QSELECT (Quick Select) command, and find out how it can speed up your object selection. Then, you’ll discover AutoCAD’s FILTER com- mand, an older method for selection filtering. While not as modern looking, it’s often more powerful for those times you really need the extra help. Select quickly with Quick Select You can access the QSELECT command (or Quick Select) from the Properties palette by clicking on the Quick Select button, typing QSELECT on the command line, or by select- ing Tools | Quick Select from the menu. Any of these methods displays the Quick Select dialog shown in Figure A. Specify the scope Starting from the top and working our way down, you’ll notice that there’s a drop-down list named Apply To where you can choose Entire Drawing or Current Selection if you’ve already selected a smaller group of objects. If you don’t have anything selected and want to define a smaller scope of objects, (smaller than your entire drawing) you can use the Select Objects button to select objects on your screen. Note if you check the Append To Current Selection Set check box at the bottom of the dialog box, the Apply To drop-down list reads Entire Drawing and you cannot use the Select Objects button (we’ll explain this more later). Define the object type The next step is to define what types of objects you want to select. The Object Type drop-down list is dynamic. This means that when you apply the filter to the entire draw- ing, the Object Type drop-down list displays only the object types that exist in your draw- ing. If you apply the filter to the current selec- tion, it lists only those objects contained in the current selection. For example, if your draw- ing or current selection doesn’t have any arcs, the Object Type drop-down list doesn’t list the arc object type. As long as there are mul- tiple object types available, there is a Multiple entry in the list. Choose the object type you want or choose Multiple if you need more than one type. Set object properties Next in the Quick Select dialog box is the Properties list box. This list box displays the

Upload: phamnguyet

Post on 01-Jan-2017

214 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Select only what you need with filters

Volume 15, Number 1 • January 2007www.elijournals.com

®

In This Issue:

Programming Techniques Create effective dialog boxes for your AutoLISP routines, part 1: Introduction to DCL

LDT & Civil 3D Extend the power of Land Desktop with Civil 3D

ADT & Revit Easily generate slab objects for floors and ceilings

Q&A Prevent unwanted zoom changes in a viewport Create legible image tiles 2004/2005/2006/2007)

AutoCADAutoCADSelect only what you need with filtersBy Darren Young

Application: Autodesk AutoCAD 2004/2005/2006/ 2007

T he key to working efficiently in AutoCAD is organization. However, even with lay- ers, dimension styles, text styles, and so on, your drawing can still become large and unmanageable due to the sheer volume of information it contains. At times like this,

it’s often a slow process to select the objects you need to edit. Luckily, AutoCAD has some great tools to help you out in these situations. In this article, you’ll learn how to use filters to quickly select objects in your drawing without having to select them one at a time.

Selection filters new and oldFirst, you’ll learn about AutoCAD’s new-est selection filtering method, the QSELECT (Quick Select) command, and find out how it can speed up your object selection. Then, you’ll discover AutoCAD’s FILTER com-mand, an older method for selection filtering. While not as modern looking, it’s often more powerful for those times you really need the extra help.

Select quickly with Quick Select You can access the QSELECT command (or Quick Select) from the Properties palette by clicking on the Quick Select button, typing QSELECT on the command line, or by select-ing Tools | Quick Select from the menu. Any of these methods displays the Quick Select dialog shown in Figure A.

Specify the scopeStarting from the top and working our way down, you’ll notice that there’s a drop-down list named Apply To where you can choose Entire Drawing or Current Selection if you’ve already selected a smaller group of objects. If you don’t have anything selected and want to define a smaller scope of objects, (smaller than your entire drawing) you can use the

Select Objects button to select objects on your screen. Note if you check the Append To Current Selection Set check box at the bottom of the dialog box, the Apply To drop-down list reads Entire Drawing and you cannot use the Select Objects button (we’ll explain this more later).

Define the object typeThe next step is to define what types of objects you want to select. The Object Type drop-down list is dynamic. This means that when you apply the filter to the entire draw-ing, the Object Type drop-down list displays only the object types that exist in your draw-ing. If you apply the filter to the current selec-tion, it lists only those objects contained in the current selection. For example, if your draw-ing or current selection doesn’t have any arcs, the Object Type drop-down list doesn’t list the arc object type. As long as there are mul-tiple object types available, there is a Multiple entry in the list. Choose the object type you want or choose Multiple if you need more than one type.

Set object propertiesNext in the Quick Select dialog box is the Properties list box. This list box displays the

Page 2: Select only what you need with filters

2 Inside AutoCAD

properties that you can filter. If you choose to apply the filter to multiple object types, the Properties list box lists only those properties in common with all the object types. This prevents you from doing anything that doesn’t make sense, like choosing all lines that have a radius of 5.

Specify an operator Just below the Properties list box is the Operator drop-down list. Here you choose the operation for your selection filter. With operators, you can tell Quick Select if your filter criteria correspond to the value you specify. Whether it’s an Equal (=), Not Equal (<>), Greater Than (>), or Less Than (<), you use operators to narrow your filter’s scope. The Operator list includes only operators that pertain to your selection. Choose Select All if you don’t want to restrict your filter to a particular value or range, for example, if you want to select all lines regardless of their properties. You’ll notice that choosing Select All disables the Properties list box.

Set a valueThe next section is the Value specifier… or maybe not. The Value drop-down list is not present when you set the Operator to Select All. At other times, it’s either an edit box or a drop-down list, depending on the property you selected. You specify the value that applies to the operation for the property of the object type. Do you see how the filter is coming together?

Figure A: Use the Quick Select dialog box to narrow your selection options.

Include or exclude selection setsThe How To Apply section offers two options. Use the Include In New Selection Set option to make a selection set of the items matching your filter crite-ria. This is the default setting. However, sometimes it’s easer to tell AutoCAD what you don’t want. For these cases, choose the Exclude From New Selection Set option, which creates a selection set of all objects that don’t match your filter criteria.

Append to existing selection setsLastly, use the Append To Current Selection Set check box at the bottom to append the objects matching your filter criteria to already selected objects. There are cases when you can’t build a filter to select every-thing you want. To handle this, you can call Quick Select multiple times, once for each condition; each time you append the new filter items to the previous selection set. This is why when you check the Append To Current Selection Set check box, the Apply To drop-down list changes to Entire Drawing rather then Current Selection, as we mentioned earlier. Because you are appending to an existing selection set, you don’t want your filter to apply to that selection set. You want to keep that selection set intact, and add additional items to it.

When you click OK, Quick Select highlights the objects that match your filter criteria. If, for some rea-son, you press the [Escape] key, clearing the selection of those items, and don’t create any new selection sets, you can get that selection set back at any Select Objects: prompt by typing Previous or just P.

Get more power with FILTER If Quick Select isn’t doing all you need, you can always revert to the older FILTER command. This command was originally created in AutoLISP years

Figure B: The Filter dialog box offers more options than Quick Select.

Page 3: Select only what you need with filters

3January 2007www.elijournals.com

ago but has since moved into the core programming of AutoCAD. FILTER isn’t quite as quick as Quick Select and is only available from the command line. Simply type filter at command line when no com-mand is active or use ‘filter to call the command transparently from any Select Objects: prompt. This displays the Object Selection Filters dialog box shown in Figure B.

As you can see, the Object Selection Filters dialog box isn’t as intuitive as Quick Select. At the top, you’ll see a wide list box. This is where you build your fil-ter. Figure B shows a filter already in place that will select all objects on layer Precast2.

Build the filter The lower-left side of the FILTER dialog box is where you define your filter. The drop-down list just below the Select Filter label is where you select the object or object properties that you want to filter. In the case of Figure B, we selected Layer. You could type the layer name (including any AutoCAD supported wildcards) or click the Select button and pick from the list of lay-ers that exist in that drawing.

Depending on which item (object type or prop-erty), other edit boxes and drop-down lists become active or inactive. For example, selecting Line End enables the X, Y, and Z operators as well as their edit boxes. Once you’ve specify the object type, property, values, and/or operators , click the Add To List but-ton to add the filter to the list box at the top of the dialog box.

The added filter appears above the currently selected item (if any) in the filter list box. This may or may not be important, as we’ll cover a little later. But knowing that you can select an item in the filter list box provides a tool that you can use if you type something wrong, or change your mind; you can use the Substitute button to swap the currently selected filter in the list box with new object types, properties, operators, and/or values you just specified.

Build a filter by exampleClicking the Add Selected Object < button temporar-ily dismisses the Object Selection Filters dialog box and lets you select an object. This isn’t the same as selecting objects with Quick Select, where you’re specifying to which objects your filter is applied. Instead, the Add Selected Object < button lets you pick an object to automatically build a filter using that object’s properties. You can then delete any of the filter items that you don’t want by highlighting it in the list box at the top and clicking the Delete but-ton below the list box on the right. If one of the filter items is close but not quite right, select it, and click the Edit Item button below the list box to puts the selected item’s values in the Select Filter section for

editing. You can then use the Substitute button as dis-cussed earlier to update that particular filter item.

Unlike the Quick Select dialog box, the FILTER command lets you build a filter that does not make sense so be careful about the items you choose. If for some reason you need to start over, just click the Clear List button on the right to clear the entire list box of all filter items.

Apply the filterOnce you’ve finished your filter, use the Apply button to apply the filter. Unlike Quick Select, which applies the filter either on a pre-selected selection set or the entire drawing, the FILTER command displays the Select Objects: prompt. This means you can use any selection option or combination of options including Add and Remove modes to select the items and apply your filter to those selections. This is one reason why the FILTER command, despite being more difficult to master and slower to setup, is more flexible.

If you called the FILTER command transparently, you’ll already be in the Select Objects: prompt, so when you press [Enter] to exit the Select Objects: prompt like you typically do, you are actually just exiting the Filter mode and then returning back to regular selection methods. This means you can select objects as you normally do, use FILTER transparently to select yet more objects, apply filters to them, exit Filter mode, and continue selecting more objects.

Name your filtersYou’ll also notice that the Object Selection Filters dialog box has a Named Filter section. If you build complex filters, you can save them and recall them later quickly and easily. If you saved a filter that you no longer need, you can even click the Delete Current Filter List button to delete the current named filter list. That’s yet another reason the FILTER command is more flexible, and even more efficient than Quick Select if you are going to use the same filter over and over.

Create complex filtersWe mentioned earlier that the FILTER command, unlike Quick Select, allows you to build incorrect fil-ters. However, with that liability comes power that you can use to your advantage. For example, let’s say you wanted to select all green circles and all red lines. With Quick Select, you would have to run through the dialog twice, the second time checking the toggle at the bottom to append to the current selection set. With the FILTER command, you can do this all at once. Figure C shows the Filter dialog with just that filter in its list box.

The first things you’ll notice are ** Begin AND, ** End AND as well as *** Begin OR and ** End OR. You can find these items at the end of the filter types drop-down list;

Page 4: Select only what you need with filters

4 Inside AutoCAD

you use them to add logical grouping to your filter. By default, if you’ve listed multiple filters, with no logi-cal grouping, the command assumes the AND grouping. You need to pair up these logical groupings; for every Begin, there must be an End of the same type.

Table A lists the available logical grouping oper-ators you can use. Each one has a BEGIN and an END option.

In our example, wanted to select lines on the red layer and circles on the green layer. Therefore, we grouped each object type and its associated layer between Begin and End ANDs because our selected objects need to meet both the object type and the layer criteria.

Then we sandwiched those filters between a set of Begin and End ORs. This may seem odd because we want to select red lines and green circles. However,

as shown in Table A, that’s what we need to do to find the objects that meet both criteria—red lines and green circles.

A minor difference you might notice between Quick Select and FILTER is their Not Equal opera-tors. Quick Select uses (<>) for Not Equal. FILTER, on the other hand, uses (!=) to indicate Not Equal.

Two fine filtersSelection filters, especially the FILTER command, take a bit of practice to use efficiently. Your effort, however, will be well worth your while. For the most part, Quick Select will be all that you need for simple, fast, filtered selections you need to do only once or twice. When you need more complex filters, use the FILTER command.Try them both out and we think you’ll find they’ll provide you with a lot of power in wading through the data in your drawing. Once you get the hang of it, you’ll use them more than you imagined.

Figure C: The FILTER command allows you to build complex filters.

Table A: Logical grouping operators.

Operator Function

AND Finds objects that meet all criteria

OR Finds objects that meet any of the criteria

XOR Finds objects that meet one criterion or the other, but not both

NOT Excludes objects that meet the criteria

Darren Young is a former AutoCAD consultant, but now works as a CAD Administrator and Program-mer at Cold Spring Granite in Minnesota. He is an AutoCAD registered Developer.

• In the Quick Select dialog box (since AutoCAD 2005), if you choose Block Reference as the object type, Name as the property, and then choose from the names of blocks in the drawing in the Value drop-down list,, you select all instances of that block.

• Color is one of the available properties in the Quick Select dialog box, but it only finds objects that were directly set to that color. What is doesn’t find are objects on a layer that you defined with that color. For example, if you have a green layer called Dim, you won’t find objects on the Dim layer if you filter for green colored objects. Instead, you need to set the property to Layer and the value to Dim. This finds objects on the Dim layer, which are green, of course.

Get the most out of filters (2005/2006/2007)

Since the lead article this month (“Select only what you need with filters”) is about filters, we thought we’d give you some additional some tips for getting the most out

of your filters:

Tips & Tricks

Page 5: Select only what you need with filters

5January 2007www.elijournals.com

Create effective dialog boxes for your AutoLISP routines, part 1: Introduction to DCLby Sanjay Kulkarni

Application: Autodesk AutoCAD 2002/2004/2005/2006

All computer applications thrive on input data from the user. A dialog box provides an elegant (and in some cases the only) way of entering data into an application. A dialog box also provides a professional and pleasing appearance to the applica-

tion. In this series of articles, you’ll learn how to create simple dialog boxes using DCL (Dialog Control Language).

Let’s have a dialogWe’ll start by analyzing the structure of a typical dia-log box. Then, we’ll explain how DCL lets you con-struct a dialog box using its components (called tiles) and attributes. Finally, we’ll discuss how to plan a useful, effective dialog box.

Anatomy of a dialog boxLet’s begin by exploring a typical dialog box to under-stand its components and their interrelationship. Figure A shows a common dialog box. For the sake of simplicity, let’s overlook all tabs other than the one shown. (DCL is not capable of creating such multi-tab dialog boxes.) In the figure, we’ve called out the areas that are of interest.

Note: We can define a dialog box in Auto-CAD as a window that appears in response to a command. The dialog box allows users to select or enter data so that AutoCAD can act on that data. The dialog box disappears once its specific task is over.

Examine the bricks and mortar The first notable area is the title bar at the top, which displays the title (or heading) of the dialog box. The user has no control over this area.

The remaining part of the dialog box is where the user can choose or enter infor-mation. Although the primary function of all these components is to gather data, they each have different ways of doing so. For example:

• Buttons (OK and Cancel) are not directly involved in getting data but play the important role of connecting the data

to your application. They are the glue of this assembly.

• Drop-down lists present the user with a list of choices to choose multiple items.

• Option buttons (sometimes called radio buttons, because they look like the knobs of an old-time radio) present a choice in a more familiar format —multiple choice questions—and allow only one to be selected from a group.

• Check boxes (often called toggles) also present a Yes/No or On/Off choice independent of any group.

Figure A: The Modify Dimension Style dialog box uses features common to many dialog boxes.

Title barDrop-down lists Text boxes

Check boxes (toggles)

Option (radio) buttons

Buttons

Programm

ing Techniques

Page 6: Select only what you need with filters

6 Inside AutoCAD

• Text boxes, perhaps the most important type of component, allow the user to type in data.

There are a few other components, such as slid-ers and list boxes, for creating more complex dialog boxes, but in this article, we’ll concentrate on the sim-pler ones.

The underlying architecture Designing a dialog box involves choosing appropriate data, capturing and connecting elements, and arrang-ing them to support their efficient use. A dialog box is not a motley collection of data-capturing elements lying here and there. The underlying architecture—the grouping and placement of the elements—is a vital part of the design.

Design is not only about looks; it’s about the intui-tive thinking of the user. When users type their first name in a dialog box, for example, they naturally expect the place for typing their last name to be along-side or below that for their first name. If the location is at the other extreme corner of the dialog box, it does its job, but is inconvenient and unexpected. In the above dialog box in Figure A, you can see how various elements are grouped together.

Dialog boxes in AutoLISP Like any other programming language, AutoLISP provides capability for the creation and execution

of dialog boxes. However, it outsources the job of designing dialog boxes to DCL. But like a good busi-nessman, it keeps to itself the controlling activities of displaying the dialog box, and capturing and pro-cessing the data. You create an AutoLISP dialog box in a separate file, called a dialog box definition file, using the DCL language.

Note: Although the “L” in DCL stands for “lan-guage,” it isn’t a full fledged programming lan-guage like C++, Visual Basic, or even AutoLISP. You can only use it for defining dialog boxes for use in AutoCAD. We’d rather call it a scripting lan-guage, or a toolkit, for AutoCAD.

Like many other support files in AutoCAD, such as linetype, shape, or hatch files, the dialog box defi-nition file is a plain text (ASCII) file with a filename extension of .dcl. This arrangement has an inherent advantage in that more than one AutoLISP program can use a .dcl file simultaneously. This also makes DCL simpler to learn and use. AutoLISP provides all of the necessary dialog box processing functions.

Designing a dialog box in AutoLISP involves two basic tasks:

1. Create the dialog box definition using DCL

2. Write code in an AutoLISP file to process that dialog box.

The toolkit for building in DCLFirst, we’ll take a look at the DCL. A dialog box in

DCL consists of a strictly hierarchical structure simi-lar to the directory (folder) structure of a computer’s hard drive. At the base, or root, is the Dialog (the pro-gramming term for a dialog box). You could call the data capturing or processing element the Leaf of this tree structure—the file, in the directory structure anal-ogy. These elements are called tiles in DCL. In between are a host of other tiles that help you build the layout (the architecture) of a dialog box. These pre-cast tiles are defined in the file base.dcl that comes with your AutoCAD installation. Table A below lists a few of the commonly used tiles:

Note: You can find the base.dcl file in the Auto-CAD Support directory. This file loads automati-cally every time you start a new AutoCAD session. Dialog boxes in AutoCAD do not work without this file. Another file, acad.dcl, contains definitions of dialog boxes used by AutoCAD. If your dialog boxes are not working properly, damaged, or miss-ing, a problem with base.dcl or acad.dcl could be the reason.

Table A: Frequently used DCL tiles

Usage Tile name

To enter text or numeric values.

edit_box

To select one or more items from a list of exist-ing items.

list_boxpopup_list

To select a unique value from a group of similar alternatives.

radio_button, boxed_radio_column, boxed_radio_row

To make a Yes/No or On/Off choice. Also called a check box.

toggle

To arrange / group related tiles together with optional border.

row, column, boxed_row, boxed_column

Action buttons to process the dialog box inside AutoLISP.

ok_cancel, action_tile (used in AutoLISP code)

Page 7: Select only what you need with filters

7January 2007www.elijournals.com

Tiles are not dumb objects. They have a per-sonality of their own and can behave differently in differing circumstances. However, you control the properties or characteristics of the tiles, called attributes, in DCL. You can assign values to these attributes and include them in the tile definitions. AutoCAD contains 35 such attributes. Most attri-butes are common for all tiles. A few attributes can only be used with specific tiles. Table B shows a few of the frequently used attributes.

DCL contains exactly 66 keywords that you can use to create a dialog box. For more detailed informa-tion on these and other tiles and attributes, you can access the on-line AutoCAD Help. Look for Design-ing Dialog Boxes in the AutoCAD Developer Help section. With this background, let’s take the dive and get ready for designing our first dialog box.

Designing dialog boxes For a few minutes, we’ll move out of the box—the DCL and AutoLISP box—and look at the process of designing a dialog box from outside. We’re trying to formulate a generic process, independent of any lan-guage or tool, for designing a dialog box. We’ll follow this procedure to develop a DCL dialog box.

As with any other task, the universal truth applies to designing dialog boxes: the more time you spend up front in planning, the more time you save during execution and especially modification.

Take time to planSince the basic function of a dialog box is to capture data it is natural that we start with this concept. Some issues we need to address are:

• The number of data items.

• The type of data: text, numerical (integers, decimals).

• The method of capturing data: by selection or by entering data.

• For selected data, is it from a list of multiple values, from a group of values, or a yes/no selection?

Decide on the necessary componentsOnce we know the number of data items and their type, the next stage is to select the appropriate com-ponents (including buttons). At this stage, we’ll also finalize the layout of the dialog box. You may try out

different variations before arriving at the final deci-sion. The issues that need to be addressed are:

• Is there any intuitive sequence of entering data? If yes, we’ll need to arrange those components in a sequence or in proximity to each other.

• Do we need to create separate groups of related items and place them in distinct containers to emphasize the distinction between them? For example, in the dialog box in Figure A, data for alternate units and zero suppression each have their own enclosures. This gives a visual clue for a mental switch in thinking.

Continue on to the execution stageAt this point, we’re ready to use the tools provided by DCL to place the components in accordance with the desired layout. We can also write the code needed to process the data captured by the dialog box. In Part 2 of this article, we’ll show you how to lay out the dialog box, choose components, and start writing the required DCL code.

Table B: Frequently used DCL attributes

Usage Attribute Name

A variable name for the tile for link-ing inside the AutoLISP program.

key

A descriptive label displayed along-side the tile.

label

Accesses the value held by the tile value

Provides a shortcut to select a par-ticular key

mnemonic

Highlights a particular tile when the dialog is displayed

initial_focus

Specifies the physical size of a tile width, height

Sanjay Kulkarni is a technical writer, CAD Programmer, and CAD trainer based in Pune, India. His articles on AutoCAD customiza-tion have been published in many periodicals and on the Internet. Sanjay can be reached at [email protected].

Page 8: Select only what you need with filters

8 Inside AutoCAD

Extend the power of Land Desktop with Civil 3DBy Michael Partenheimer

Application: Autodesk® Civil 3D 2006/2007, Autodesk®, Civil 3D-Land Desktop Companion 2006/2007, Autodesk® Civil 3D-Civil Design Companion 2006/2007

With each yearly product release Civil 3D exhibits greater power and more matu-rity. In an article in the October 2006 issue (“Should You Switch From Land Desktop to Civil 3D?”) we detailed how the current release, Civil 3D 2007

shows great promise and contains some key improvements to the product’s aging ances-tor, Land Desktop/Civil Design/Survey. Without a doubt, the use of Civil 3D requires a quantum shift in an established and very comfortable engineering workflow process. Many long-time users of Land Desktop will find it difficult to define a clear and simple

migration path to Civil 3D. The move to Civil 3D appears to be an all or nothing, sink or swim proposition. As such, many people fear migration will be a costly, possibly painful, time-consuming operation. Rather than use a migration strategy of going all-in, you could consider a more modest start – one that will permit you to continue operating in your Land Desktop comfort zone while acclimating to the power of Civil 3D. This month we’ll show you how to use Civil 3D as an extension to Land Desktop (LDT) on spot tasks to facilitate an easier migration.

Moving dataIn this article, we’ll show you how to easily and quickly migrate your Land Desktop database proj-ect information into Civil 3D using tools specifically designed to do just that. We’ll then show you a couple of tasks that are so easy to perform in Civil 3D that you’ll not want to use Land Desktop for these tasks again. Finally, we’ll show you how to move design data from Civil 3D into your Land Desktop database so that you can continue project production in your LDT comfort zone.

Acquiring both productsFrom a product acquisition standpoint, Autodesk has made migration from Land Desktop to Civil 3D simple, Autodesk Civil 3D ships with a second disk included in the box entitled Autodesk Civil 3D – Land Desktop Companion. This disk, which contains a full working version of Land Desktop, runs on your Civil 3D license and entitles you to use Land Desktop as part of your Civil 3D fulfillment. There is no need to purchase both products. The Land Desktop add-ons, Survey and the renamed Civil 3D – Civil Design Companion, must still be purchased separately. Note that Civil 3D – Civil Design Companion runs on Land Desktop, not Civil 3D.

Targeting your tasksIn LDT you use points, alignments, profiles, and breaklines to generate surfaces. Your surfaces are then used to generate different project data such as cut/fill elevations, slope analysis, and daylight lines. By comparing surfaces against each other, you obtain earthworks volumes. Sometimes this data is used to generate non-graphical reports such as volume cal-culations. Other times the data is used to produce construction documents such as a cut/fill maps.

Both LDT and Civil 3D use points, alignments, profiles, and surfaces to produce the lion’s share of production data used in LDT today.

Moving LDT data to Civil 3DLand Desktop project data can be moved into Civil 3D very easily and very quickly. To easily demon-strate this, utilize the tutorial which ships with LDT as an LDT data source. Because the LDT tutorial is in metric units, you’ll need to start with a metric Civil 3D drawing. Begin by opening Civil 3D. On the main menu click File | New to open the Select Template dialog box and select _Autodesk Civil 3D (Metric) NCS Classic.dwt as your template. Whenever the LDT data is based on feet instead of meters, you’ll want to utilize one of the Imperial templates, such as _Autodesk Civil 3D (Imperial) NCS Classic.dwt.

Once you have a Civil 3D drawing started from the appropriate template, click File | Import | Import

LDT

& C

ivil

3D

Page 9: Select only what you need with filters

9January 2007www.elijournals.com

Data from Land Desktop on the main menu and the Import Data from Autodesk Land Desktop Project dialog box will open. You’ll notice an instructional warning at the bottom of the dialog box which urges you to only import necessary data into Civil 3D.

The Land Desktop database, which is external from the LDT drawing files, contains all of the data for your entire project. This can be quite sizable on some projects. Civil 3D, by comparison, stores proj-ect data within the drawing files themselves. A single drawing file containing the entire project design data for a large project will suffer a performance issue, that’s why Autodesk wants you to import only neces-sary data into the Civil 3D drawing file.

By default all available data in the LDT database is pre-selected for import to Civil 3D. You’ll want to deselect all but your necessary data as shown in Figure A. Click on OK, dismiss the import confirma-tion dialog box, and you are done. Zoom extents to graphically view the data you just imported.

Using the Civil 3D Import Data from Land Desk-top command you can import LDT surfaces, hori-zontal alignments, vertical profiles, pipe data, and point description keys. You must, however, import the point data using a different method. Select Points | Create Points from the main menu to open the Cre-ate Points dialog bar. Civil 3D dialog bars, which look like toolbars, are actually dialog boxes that have been designed to look like traditional AutoCAD toolbars. Click on the double down arrows to expand or the

Figure A: Import only the data you need.

Figure B: Civil 3D’s dialog bars are actually versatile dialog boxes.

double up arrows to collapse any Civil 3D dialog bar. In our example, click on the Import Points button – the far right button shown in Figure B – to open the Import Points dialog box.

Note: When importing surfaces, you’ll lose break-line data during the process. If breaklines are needed you’ll want to generate 3D polylines from breaklines in LDT, block them into your Civil 3D drawing, and then edit your surface using the 3D polylines to define your breaklines in the Civil 3D surface(s).

To select a Land Desktop point database, choose External Project Point Database from the Format drop down and then enter the name of the source file, C:\Program Files\Autodesk Land Desktop 2007\Land-Tut\Tutorial1\COGO\points.mdb for our example, as shown in Figure C. Click on OK and the LDT point database information becomes part of the Civil 3D drawing.

Civil 3D utilizes something called the Toolspace as a data control panel. The Toolspace is turned on by default when Civil 3D is first installed. It can be turned off by clicking the X in the top right corner. To turn the Toolspace on, select General | Show Toolspace from the main menu. For our example, as shown in Figure D, the Toolspace displays the imported surfaces – EG and FG – and the point data listed below whenever the Points object is selected on the Toolspace Prospector tab.

Figure C: Import LDT point data into Civil 3D.

Page 10: Select only what you need with filters

10 Inside AutoCAD

With LDT data imported into the Civil 3D drawing file, the data can be analyzed or manipulated using Civil 3D. You’ll want to keep things simple and easy at first, but as you gain Civil 3D experience and con-fidence, you’ll be able to accomplish more and in less time – even if you are not ready to commit 100% to Civil 3D. Be sure to save the data you just imported into your example drawing, you’ll want to use it to quickly run a volume calculation. Use the SAVE com-mand to save your drawing.

Keep it simple at firstIf you don’t use Civil 3D for anything else, use it to check your Land Desktop volumes. Calculating vol-

umes is one of the easiest things you can do with Civil 3D which is in stark contrast to the cumber-some, confusing, and often trouble-prone sequence of commands necessary to generate volumes in LDT.

Using the Civil 3D file containing the data you just imported from LDT, select Surfaces | Utilities | Vol-umes from the main menu. A palette called the Pan-orama will open. You’ll see a tab on the side of the Panorama labeled Composite Volumes. You’ll also see six button icons just above a table field. Each time you click on the Create new volume entry button – which is the left-most button – you’ll add a surface comparison pair to the table field. Click on the Create new volume entry button at least once. Index 1 is cre-ated. Click the Index 1 cell in the Base Surface column and select the EG surface. Next click the Index 1 cell in the Comparison Surface column and select the FG surface. Finally click on the fifth button from the left – the recompute volumes button – to obtain a volume result of the two surfaces, as shown in Figure E.

As you become more familiar with Civil 3D, you’ll want to generate surfaces utilizing Civil 3D’s corridor tools and/or grading objects, both of which are more powerful and easier to use than Land Desktop’s equiv-alent tools. Civil 3D’s corridor assemblies are particu-larly easy to learn and use. Use Civil 3D to generate a roadway surface, then move the surface into Land Desktop for integration into the rest of the project. By avoiding Land Desktop’s cumbersome roadway tem-plates, you can save yourself a lot of time and effort.

Moving Civil 3D data to LDTIt’s quite possible you’ll reach a level of comfort where you’ll want to generate design surfaces in Civil 3D but you’ll still want to use the familiarity of Land Desktop to generate your drawing sets. Autodesk has added a command to LDT which makes Civil 3D to LDT data migration straightforward.

With Civil 3D closed, open a Civil 3D drawing file using Land Desktop. Select Projects | Extract Civil 3D Data from the main menu in LDT. The Extract Civil 3D Drawing Data dialog box will open. Simply specify where your Land Desktop project is stored and to which project you’ll be adding the data. You have the option to include or exclude any of the data Figure D: The Toolspace is the Civil 3D project data control panel.

Figure E: Civil 3D volumes are simple and straightforward.

Page 11: Select only what you need with filters

11January 2007www.elijournals.com

and to overwrite your existing LDT data if desired as shown in Figure F.

Open any of your Land Desktop project drawing files and you’ll find the Civil 3D data is now part of your project, ready to use.

The best of both worldsThe ability to easily and quickly move design data back and forth from Land Desktop to Civil 3D gives you, as a Land Desktop user, the ability to leverage Civil 3D as a very pow-erful extension to Land Desktop. When you incorporate only the Civil 3D tools that are in your comfort zone, you can maintain your established Land Desktop productivity and workflow while, at the same time, developing skills for the future. You can learn Civil 3D at your own pace, get your cur-rent work done, and develop a migration strategy all at the same time.

Figure F: Civil 3D data is easy to add into an LDT database.

Easily generate slab objects for floors and ceilingsby H. Edward Goldberg AIA

Application: Autodesk Architectural Desktop 2006/2007®

Designing floor slabs is as important as designing walls. With the sophisticated tools of Architectural Desktop, slabs are no longer monolithic as you can easily design slabs and slab objects with components similar to the method you use for walls.

Slab objects are easy with a few tricksIn this tutorial, we’ll show you a trick using the Auto Generate tool that makes the creation of slabs much easier. Then, we’ll explain the basics of how to modify floor slabs. Finally, we’ll discuss how to create holes and modify edges in slabs.

Do you need a new slab tool palette?Before you start creating slabs, you may want to cre-ate a tool palette that holds only slab objects. To do this, create a new tool palette, and name it SLAB. Press [Ctrl][4] to open the Content Browser. In the Design Tool Catalog—Imperial, locate the Slabs folder in the Roof Slabs And Slabs folder. With the new SLAB tool palette

locked open, drag all the slabs from the Slabs folder into the new tool palette you created. Click and hold on the tab of your new tool palette and drag a copy to My Tool Catalog in the Content Browser for future use by you or to send to someone else for their use.

Use the Space Object To Slab optionSince Architectural Desktop 2006, you can apply slabs to space objects. Combined with the Auto Generate tool, this gives you much more control over floor and ceiling slabs. To start our exercise, first create a series of enclosures. Choose File | New and start a new drawing using the AEC Model (Imperial - Stb) tem-plate. Then, change to Top or Plan view. Select the

ADT

& R

evit

Mike Partenheimer is the Corporate CAD Manager of the civil engineering firm Hall & Foreman. He is also the imme-diate past-president of the Civil CAD Consortium (C3). He can be contacted at [email protected].

Page 12: Select only what you need with filters

12 Inside AutoCAD

Figure A: These enclosure need some slabs!Figure B: You can control the dimensions of the space object in the Properties palette.

Wall tool from the Design tool palette, and using a standard 10’ high, 8” wide wall, create the enclosures shown in Figure A.

After you have created the enclosures, choose the Space Auto Generate Tool from the Design tool pal-ette, and place the cursor over one of the enclosures you just created until the Generate Spaces dialog box appears. Next, right-click to display the shortcut menu and choose Generate All to create space objects in all the enclosures. Close the Generate Spaces dia-log box to return to the drawing editor.

Next, change to SW Isometric view. Select one of the walls, right-click, and choose Select Similar from the shortcut menu to select all the walls. With all the walls selected, click on the Isolate Objects icon at the lower right of the Drawing Editor, and choose Hide Objects from the shortcut menu that appears. The walls are now hidden, displaying only the space objects.

Double-click each space object individually to open the Properties palette. In the Properties palette, change the Overall Space Height, Floor Thickness, and Ceiling Thickness for each space, using the val-ues shown in Figure B.

Click the Slab tool from the Design menu, right-click, and choose Apply Tool Properties To | Space from the shortcut menu that appears. Select all the spaces, and press [Enter] to open the Convert Space To Slab dialog box. In the Convert Space To Slab dia-log box, check the Convert Ceiling to Slab, Convert to Slab, and Erase Layout Geometry check boxes, as shown in Figure C, and then click OK to return to the Drawing Editor.

You have now converted the space objects into slab floors and slab ceilings. Because you can con-trol the thicknesses and vertical locations of the floors and ceilings in space objects, this is the recommended method for creating slabs. You can now treat these slabs as standard slab objects. You can cut them, change their elevations, create holes in them, and stretch and edit them with vertices, as shown in Figure D.

Create and uncreate holes in slabsTo continue working with the slabs, hide all the slabs except one. Change to the Top view and use the Rect-angle tool from the Draw menu to place a rectangle on the slab. Next, use the Polyline tool from Draw menu to place an odd shape on the slab, as shown in Figure E.

Select the slab, right-click, and choose Hole| Add from the shortcut menu. Next, select the rectangle and polyline you created, and press [Enter]. Enter Y (Yes) on the Command line to erase the layout geom-etry you just placed, and again press [Enter] to create the holes. Note that you must use a closed polyline to make this command work. The result is shown in Figure F.

If you want to put a circular hole in the slab, you can’t use the Circle tool from the Draw menu because it isn’t a polyline. But there is a workaround using the DONUT command. The DONUT command is an old AutoCAD command that creates a circle with a line thickness. To do so, it automatically creates and joins two polyline arcs.

Page 13: Select only what you need with filters

13January 2007www.elijournals.com

Change to Top view, type donut on the command line, and press [Enter]. Enter 4’- 0” on the com-mand line for the inside diameter of the donut, and press [Enter]. Enter 4’- 0” on the command line for the outside diameter of the donut, and again press [Enter]. Next, place the donut where you want the circular hole, and again choose Hole | Add as we explained earlier, using the donut you just placed. By making the inside and outside diameter of the donut the same, you eliminate any width problems which would result from the fact that the circle diameter is always at the center of the line width. The result is shown in Figure G.

Note: Removing a hole is simple; just select the slab, right-click, choose Hole | Remove from the shortcut menu, and select any hole you created.

Cut slabs and edit edgesOne of the best features of the slab object is that you can modify its edges with custom profiles. This is handy when you want to slope or chamfer the edge of a slab. To continue our exercise, again choose the Isolate Objects icon

at the lower-right of the Drawing Editor, and choose End Object Isola-tion to make all the slabs visible. Select one of the floor slabs, choose the Isolate Objects icon once again, and then select Iso-late Objects again to hide all the slabs except that one. Double-click the slab object to open the Proper-ties palette and change its Thickness value to 12”.

Cut the slabSwitch to Top view and draw a polyline across the slab. Select the slab object, right-click, and choose Cut from the shortcut menu. At the command line prompt for a cutting object, select the polyline and press [Enter]. Enter Y (Yes) on the command line to erase the layout geom-etry you just placed, and then press [Enter] to erase the polyline and cut the slab object into two slabs. Double-click one of the

Figure C: You can quickly convert a space object to a slab.

Figure D: You have just created these slab floors and walls.

Figure E: We added polylines to the slab.

slabs to open the Properties palette. In the Properties palette change its elevation to 12”.

Edit the edge Select the upper slab, right-click, and choose Add Edge Profiles from the shortcut menu. Select the edge shown in Figure H. Click Yes at the warning that there is no Edge Style.

Page 14: Select only what you need with filters

14 Inside AutoCAD

Figure G: Use the DONUT command to create a circular polyline for a hole

in a slab.

Figure F: Our slab now has some interesting holes in it.

Click Yes to open the Edit Slab Edges dialog box. Select Standard from the Edge Style drop-down list and then click OK to open the Add Fascia Profile dialog box. Under the Profile field, you will see Start From Scratch; leave this field unchanged. Enter STEP in the New Profile Name field, and click OK. A blue field now appears at the edge. Select the field to acti-vate its’ vertices, and move the lower vertex as shown in Figure I.

Finally, click the Save All Changes button in the In-Place Edit menu that appeared, and you have now changed the slab profile, as shown in Figure J.

Just a few easy stepsArchitectural Desktop is capable of creating slab and slab objects easily and quickly while offering you maximum flexibility. With a little practice, you’ll soon be able to get just the results you want.

Figure H: To make the modification,

first select this edge.

Figure I: To edit the slab, use the vertices.

Figure J: We successfully modified the slab using the vertices.

H. Edward Goldberg is a practicing architect, industrial designer, and educator. Ed is also the author of The Autodesk Architectural Desktop Book series 3.3, 2004, 2005 and 2006, published by Prentice Hall.

The GETSEL Express Tools command creates selection sets from a layer and an object type that you select in your drawing. You might use this when you want to select objects that aren’t visible in the drawing area. Choose Express | Selection Tools | Get Selection Set. For example, if you want to select all ellipses on layer Blue, at the Select an object on the

Source layer <*>: prompt, select any object on the Blue layer. Then, at the Select an object of the Type you want <*>: prompt, select any ellipse. The prompt then informs you, Collecting all ELLIPSE objects on layer Blue. The command doesn’t highlight the selected objects, but you can use the selection set with the next command using the Previous option.

Get the most out of filters (2005/2006/2007)

Since the lead article this month (“Select only what you need with filters”) is about filters, we thought we’d give you some additional some tips for getting the most out

of your filters:

Tips & Tricks

Page 15: Select only what you need with filters

15December 2006www.elijournals.com

AutoCAD®

Inside AutoCAD (ISSN 1071-0728) is published monthly by Eli Journals, Inc., a subsidiary of Eli Research, 2222 Sedwick Road, Durham, NC 27713.

Customer Relations & Subscription ServicesNew Hill Services Dept. 1380 Denver, CO 80291-1380 Email: [email protected]

U.S. toll-free . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (800) 223-8720 Outside U.S. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (239) 280-2383 Fax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (800) 508-2592

EditorialSenior Editor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Ellen Finkelstein . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Email: [email protected]

Contributing Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Bill Fane Jim LoFaso

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Fred A. Washington Darren Young

Graphic Designer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Pam Nichols Managing Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Stephen Dow Editorial Director . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Erin Lang Bonin, PhD

Publishing & SalesPublisher . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Craig Scott . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (919) 281-0474, ext. 324

Bulk Sales . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pam Snyder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (877) 853-9938

Customer Service Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Holly Smith

PostmasterPostmaster: Send address changes to:

Inside AutoCAD

P.O. Box 413006

Naples, FL 34101-3006

PriceDomestic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . $127/yr.

Outside the U.S. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . $137/yr.

GST #: 889037958. PM #: 40031405.

Back IssuesTo order a back issue, call Customer Service at (800) 874-9180. You can pay with MasterCard, VISA, Discover, or American Express.

Copyright© 2007 Eli Journals. This work is an independently produced publication of Eli Research, the Content of which is the property of Eli Research or its affiliates or third-party licensors and which is protected by copyright law in the United States and elsewhere. The right to copy and publish the Content is reserved, even for Content made available for free, such as sample articles, tips, and graphics, none of which may be copied in whole or in part or further distributed in any form or medium without the express written permission of Eli Research. Requests for permission to copy or republish any Content may be directed to Mark Lydard (800) 508-1316 or via email at [email protected].

Inside AutoCAD is a trademark of Eli Journals. All product names or services identified throughout this journal are trademarks or registered trademarks of their respective companies.

Have information on copyright violations? Call us! We’ll share 25% of the net proceeds of all awards related to copyright infringement that you bring to our attention. Direct your confidential inquiry to Mark Lydard (800) 508-1316.

Printed in the U.S.A.

Are you moving?If you’ve moved recently or you’re planning to move, you can guarantee uninterrupted service on your subscription by calling us at (800) 874-9180 and giving us your new address. Or you can fax us your label with the appropriate changes at (585) 789-3560. Our Customer Relations department is also available at /www.eliresearch.com/contact.htm.

To see a list of our products, visit our websites at www.elijournals.com and www.eliresearch.com.

I received a drawing from a friend who generated several viewports in a layout. I needed to add two details and more annotation to the sheet layout. I unlocked the viewports to change the

scale and the area that the section of the model space drawing displayed (pretty normal stuff so far). Here’s the strange thing; when I switched into one viewport, all the viewports zoomed out. I set the scale in the viewport I was in and panned to the area to display. When I switched to another viewport the one I just modi-fied zoomed out. This happened whenever I switched to any viewport. Why are my viewports zooming like this?

-T. Maxwell via Internet

Prevent unwanted zoom changes in a viewportby Fred A. Washington

Application: Autodesk AutoCAD 2006/2007 Ques

tions

&

Answ

ers

This problem has been experienced by many AutoCAD users over the years. Figure A shows a Before (left) and After (right) example of what happens when viewports are unlocked and one viewport is made active.

The layout on the left shows the state of the view-ports while working in paper space. The layout on the right shows the effect of making one viewport active. You can see that the zoom of all of the view-ports changes.

The cause of this problem is a system variable called UCSFOLLOW which causes AutoCAD to auto-matically switch to plan view whenever you change from one UCS to another. You can set UCSFOLLOW for each viewport. When you enable the UCSFOL-LOW setting (by setting it to 1), switching between paper space viewports or from paper space to model space through a viewport causes AutoCAD to gener-ate the plan view in all unlocked viewports.

To get a viewport to function normally make the viewport current and enter UCSFOLLOW at the command prompt. AutoCAD

Figure A: Unlocked viewports in a layout can lose their assigned scales after you make one viewport active.

Page 16: Select only what you need with filters

2072

Please include account number from label with any correspondence.

16 Inside AutoCAD

will issue the following prompt, “Enter new value for UCSFOLLOW <1>:” Reply by entering 0.

Now the view in the viewport will maintain its scale, orientation, and view as expected. Repeat this process on each affected viewport.

Create legible image tiles (2004/2005/2006/2007)by Fred A. Washington

Application: Autodesk AutoCAD 2006/2007

I ’ve run into a little problem with AutoCAD 2006 menu customization. I’m no programmer, but I know how to rig menus to create buttons that work the way I need them to. I’ve tried to set up an image tile dialog box,

but the images are terrible. I have 3D objects that I need to create image tiles from. I looked at the images for the out-of-the-box AutoCAD menus and they are bold and clear, whereas mine are faint and sketchy. I found out I had to use SHADEMODE to remove hidden lines. How do I get my images to appear legible?

AutoCAD allows you to create and modify the existing image tile menus. The image tiles are based on slides that you create with the MSLIDE com-mand. You use with an external program called slidelib.exe (in the AutoCAD installation folder) to compile the slides compiled into a slide library.

Slides created from 3D models lack the proper lineweight. Figure B shows the slide viewed in the AutoCAD drawing window. Figure C shows the slide viewed in an image tile menu. Slides

made from a shaded 3D model will also

Figure C: A slide viewed in an

AutoCAD image tile dialog box is

grainy and unclear.

be poorer in quality and significantly larger than slides generated from 2D geometry.

The answer to better slides in this case was to use the SOLPROF command to generate a 2D view of the model, apply lineweights, then use the much smaller slide image. Figure D shows the slide we created from the 2D version of the 3D model viewed in the drawing window. Figure E shows the slide we created from the 2D version of the 3D model viewed in an image tile

dialog box.

Figure D: We created this slide using the SOLPROF command, which creates 2D views of 3D objects.

Figure E:When we used the slide image in an image tile

menu, the result is much clearer.

Figure B: A slide viewed in the AutoCAD drawing window appears clear and sharp.