|
|
Geospatial Analysis with AutoCAD Map 3D, Part 3
17 Feb, 2010 By: Michael SchlosserQuery your CAD drawings to access the wealth of data they contain: points, lines, text, and more.
It is said, "A picture is worth a thousand words." Now, imagine what we could do with a picture if it were more than a drawing — what if that picture were data too? In engineering and architectural design, CAD drawings are often treated as pictures and used to illustrate a design for construction purposes. However, CAD drawings, such as those created with AutoCAD software, contain a wealth of information that can be used for additional benefit. For example, a DWG file can consist of points, lines, text, and other CAD entities, as well as numerous CAD properties such as layer, line style, color, block name, and more.
With AutoCAD Map 3D software, this information can be queried and analyzed in much the same way that a spreadsheet or database can be queried. We can use this capability to help create new drawings, generate material lists and reports, find specific CAD features, and otherwise reveal new patterns in the data. With AutoCAD Map 3D we can use CAD data queries to help answer questions such as "How many power poles are in a proposed subdivision?" and "Where are all the fluorescent light fixtures in a specific building renovation?"
In this article, we will show how to use AutoCAD Map 3D to query your CAD drawings and explore why AutoCAD Map 3D is a great tool for analyzing your CAD data. A video demonstrating the techniques discussed below is available via my blog.
CAD Data Queries
In AutoCAD Map 3D, you can use four types of CAD data queries to help analyze DWG files:
- Location queries are used to define a spatial filter. For example, search for all objects that fall within a rectangular window.
- Property queries are used to create a filter based on an object's CAD properties. For example, find all objects on a certain layer or of a specific color.
- Data queries are used to define a filter based on object data. For example, if an object data field named Pipe Diameter is attached to lines representing water mains, we can find all water mains with a pipe diameter greater than 8 inches.
- SQL queries are used to create a filter based on an object's external data. For example, if our polygon objects are linked to an external database containing assessment information, we can find all polygons with assessed land values greater than $50,000.
For discussion purposes, we will query a DWG file containing a municipal water main network. Specifically, as part of a municipal water main replacement program, we need to determine the location of all cast-iron water mains and the total length of all cast-iron pipe to be replaced.

To query CAD data, we must first attach the DWG file containing our water main network to the current drawing. By attaching a DWG file rather than opening the file directly, we allow multiple users to work with multiple DWG files simultaneously — an efficient workflow that helps minimize bottlenecks when more than one person needs to work with the same file.
In the Map Task Pane, activate the Map Explorer tab then click Data > Attach Source Drawings to reveal the Select Drawings to Attach window. In the upper pane of this window, navigate to the appropriate folder, select the DWG file containing the water mains, click the Add button, and then click OK.
Now that the water mains drawing is attached, we can create our queries. In Map Explorer, click Data > Query Source Drawing to reveal the Define Query window.

Define a location query by clicking on the Location button to reveal the Location Condition window. Several types of spatial locations can be defined to filter our water mains by location. Select the All option and then click OK to return to the Define Query window. Ensure that the Query Mode is set to Preview, and then click Execute Query.
1 2 3

|
|
AutoCAD Tips!
Autodesk Technical Evangelist Lynn Allen guides you through a different AutoCAD feature in every edition of her popular "Circles and Lines" tutorial series. For even more AutoCAD how-to, check out Lynn's quick tips in the Cadalyst Video Gallery. Subscribe to Cadalyst's Tips & Tricks Tuesdays free e-newsletter and we'll notify you every time a new video tip is available. All exclusively from Cadalyst! |
Poll not yet available. |




