Está en la página 1de 3

One of the more powerful aspects of source drawing queries is the ability to combine multiple query

conditions, and multiple query types, so that you can very selectively retrieve objects. Compound

queries combine multiple query conditions.

Begin in a blank drawing. The first step is to attach some source drawings. In the Map Explorer, right-

click Drawings and click Attach. In the Attach Drawings dialog, select your drive alias, navigate to the

dataset folder, and select the Drainage, Parcel, and Sewer drawings. Click Add, and then click OK.

To get some general reference information, perform a quick view of the Parcels drawing, and zoom

extents.

In this query, you are going to find parcels in a specific location that have improved values of between

$150,000 and $300,000. Zoom in on the area of interest, and in the Map Explorer, double-click

Current Query. Start with a basic location query. Click Location, and in the Location Condition dialog,

select Polygon, with a Crossing Selection Type, and then click Define. Draw a polygon around your

area of interest, and press ENTER. Back in the Define Query dialog, you have the first statement of

your query, for the location.

Next, you need to add a Data condition to this statement. In Query Type, keep the default And

function, which means that the query will need to conform to both statements, and then click Data.

For Data Condition, click Object Data, and select the PARCELS table. In the Parcels table, select the

Improved Value field. For Operator, select greater than (>), and type in the Value 150000. This value

field does not allow you to use any special characters, including commas, so you need to be very

careful when entering large numbers. Click OK to add this data condition, and here, you can see the

beginning of your compound query, and that both statements are combined with the And operator.

It is a good idea to test the performance of this query before you add any more statements. To do this,

click Preview, and then click Execute Query. This gives you a view of the two statements that you

have already built, and the results that you see on the screen are all of the parcels within the polygon

that have a value greater than $150,000. Now that you know that the initial statements work, go back

in and add the third condition that will limit this to parcels that are less than $300,000.

Double-click Current Query, and when the interface returns to the Define Query dialog, you can see
that all of your work to build this query so far is retained within the dialog. All you have to do is add

the third condition to your statement. In this way, you can test your queries as you build them. While

this query might be fairly simple, often queries will have several conditions, and you can test those

conditions along the way using the preview mode.

Leave the Operator set to And, and click Data. Your objective now is to use the same table and field

from the previous condition, but limit this condition to less than
$300,000. Click Object Data, select the PARCELS table, and the Improved Value field. This time, for

Operator, select less than (<), and for Value enter 300000, (and remember, this field will not accept a

comma), and click OK. Now, under Current Query, there are three conditions in this statement. With

Preview mode still set, click Execute Query. And now you can see the results of the parcels within the

polygon that are worth more than $150,000, and less than $300,000.

Next, you are going to add a fourth condition which will remove a portion of the area for the results of

this query. Double-click Current Query, and in the Define Query dialog, under Query Type, set the

Operator to And Not. Click Location, select Window, and then select the area of the drawing that you

want to exclude from the query. Back in the Define Query dialog, you can now see the fourth

condition that uses the And Not condition. Click Execute Query, and now on the screen, you can see

that the area you selected has been excluded from this query.

You can see how powerful compound queries are, the uses of which are nearly unlimited. This is a

key component of GIS analysis that you can easily perform within AutoCAD Map 3D, using standard

DWG data.

También podría gustarte