Sunteți pe pagina 1din 3

Alter Properties Queries enable you to change the properties of objects as they are queried into the

current drawing. This is a very powerful tool to create thematic maps, and perhaps even more

powerful is the ability to make mass edits to objects as they are queried. Using alter properties is a

two-step process. First, you have to define the query that will retrieve the objects that you want to

alter, and second, you define the parameters of the alter properties.

In this exercise, you will change the color of sewer lines, based on their sizes, as they are drawn into

the current drawing.

Begin with a blank drawing, and then attach some source drawings. In the Map Explorer, right-click

Drawings, and click Attach. Select your drive alias, navigate to the dataset folder, and select the

Drainage, Parcel, and Sewer drawings. Click Add, and then click OK. To orient the drawing, perform

a Quick View on the Parcels drawing, and then zoom to extents.

Next, create a query to retrieve all of the sewer lines. In the Map Explorer, double-click Current Query,

and in the Define Query dialog, select Property to create a property query. Then select the Property

Condition > Layer. Click Values and select the SEWER_PIPES layer, and click OK. In the Property

Condition dialog, click OK again. This completes the first step in the process of defining which objects

you want to query. The next step is to define how you want those objects altered.

Under the Options area of the Query dialog, click Alter Properties. The Set Alter Properties dialog is

divided into three main sections. At the top is a list of the current property alterations. Next are the

properties that you can select to alter, and at the bottom, is an area where you can define

expressions. You can see from the list of properties that you can alter almost any property of these

objects using this powerful tool.

For this query, to alter the color, under Select Property, select Color. Once you do this, you can see

that the Expression area is activated. You can type in an AutoCAD color by value, such as 1 for red, 4

for cyan, and so on. In this case, you will use an expression that reads the pipe diameter, and uses

that integer as the AutoCAD color value. So for example, a 4-inch pipe would be cyan, a 6-inch pipe

would be magenta, and so on, based on the AutoCAD color numbers. To start this, click Expression,

expand Object Data, expand SEWER_PIPES, select PIPESIZE, and click OK.
Back in the Set Property Alterations dialog, add the expression, and you can see that expression at

the top. This expression says: "change the color, go to the pipe size field, in the sewer pipes table

and use that value to define the color of each pipe that is queried into the drawing". Click OK to save

this expression. In the Define Query dialog, change the Query Mode to Draw. Alter property queries

only work with a Draw query, not a Preview query. Click Execute Query. Now zoom in and look at

some of the objects.


You can see that there are now some different colors for the sewer lines. Double-click one of the

magenta lines, right-click and click Properties. At the top of the Properties Palette, you can see that

the color is magenta, and when you scroll down to the Object Data, you can see it's a 6-inch pipe. Six

is the AutoCAD number for the color magenta. Press ESC and select an orange line, and you see

that this is color 10, the AutoCAD value for orange.

Now when you look at the sewer collection system, the attributes of the sewer lines are obvious. In

this example, all of the sewer lines that are magenta are 6-inch lines, and the same is true for all of the

other colors as well. The color matches the diameter. Think of this as a thematic map.

You can also easily use property alterations to create conditions that would alter the properties in such

a way to help you reorganize data. For example, you could have created an alter properties query

that placed all of the pipes on certain layers based on their material.

When combining the process of clearly defining a query that retrieves certain objects, along with

property alterations, this becomes a very powerful tool in not just visualizing objects, but creating a

scenario that enables mass editing of objects, as well.

S-ar putea să vă placă și