Hiển thị các bài đăng có nhãn Point Styles. Hiển thị tất cả bài đăng
Hiển thị các bài đăng có nhãn Point Styles. Hiển thị tất cả bài đăng

Thứ Tư, 20 tháng 8, 2008

Points from a text file

One of the tasks a Map user has to do is bring in points from a text file or a database. With the civil 3D tools in Map R2005 & 2006 you could use the civil points tools to do this but it required the point file to be in a certain format and we end up having to work on getting it to work correctly a few times when we don’t use it all the time. But thanks to a reminder from a poster on the AutoDesk discussion groups for reminding me of an old forgotten AutoCAD command, the “Multiple” command. What this command does is repeats a command that you provide in the command line until you press the escape button.
The thing you need too do is make sure the text file contains nothing but the coordinates for the points, if you have attributes or a point number mixed in with the coordinates you need to delete them from the file. So your text file is something like this:

1705145.103,829479.6554,0
1708780.203,825996.5793,0
1709520.941,823934.5335,0
1710569.845,824786.8715,0
1710583.068,824685.7594,0
1709493.485,828888.0862,0
1709298.454,831331.2523,0

Now with the file open select all the points and use ctrl+C to copy the lines to the windows clipboard. Back in your drawing give the MULTIPLE command, then the POINT command then paste the text from the clipboard by using ctrl+v when it asks “Specify a point”. The points should be created based on the text file. You then have to press the escape key to end the MULTIPLE command.

Command: multiple
Enter command name to repeat: point
Current point modes: PDMODE=35 PDSIZE=0.0000
Specify a point: “ctrl&v to paste the text file here”.

A simple way to add points, keep in mind your point mode settings so you can see the points but this is a quick way to bring simple points into your map.

viewmore

Thứ Tư, 6 tháng 8, 2008

Description Key Sets and Point Styles, Part 3

Last time we reviewed default point label settings and point label styles. A description key set assigns a point and label style to each point matching an entry in the key set.

Creating a Point Label Style
A point label style is no different from any other label style in Civil 3D. A point label style uses the Label Style Composer for default layers, text styles, plan readability, label components, and dragged state settings. The Text Component Editor formats the label's contents. Understanding these two editors is key to creating any Civil 3D label.

When selecting New from the Point Label Styles heading's shortcut menu, the Text Component Editor displays ready for a new label style definition. The Information panel sets the label's name, description, and creation date.

General
Next is the General panel. This panel has three sections: Label, Behavior, and Plan Readability. The Label section sets the label's text style, visibility, and layer. The default settings for this section are from the Edit Label Style Defaults at the Drawing level or the Point branch. Changing the values at this point changes them only for point label styles. The visibility toggle hides all label style occurrences. Rather than toggling off a layer containing potentially different label styles, this toggle hides all occurrences of this label style.

The most important question is what layer to use. If setting the layer to 0 (zero), the label uses the parent object's layer as defined in Edit Drawing Settings' panel: Object Layer. If setting a layer, the label uses the assigned layer. See also the discussion of ByLayer/ByBlock in the Layout panel.

figure
The General panel.

The Behavior section defines the label's orientation to the object it labels. The Plan Readability section defines when the label flips, maintaining left to right readability. The Plan Readability property is a toggle setting whether a label flips. The Readability bias is the amount of rotation needed to flip the label. When set to true, the label flips when the view is rotated 110 degrees or more. The initial label placement creates a label reading left to right, and if rotating the view by 110 degrees or more, the label will read from bottom to top. The label then flips to be readable from top left to lower right.

figure
Flip Anchors relocates the label's anchor point. Setting this value depends on the label's components and their organization.

Layout
The Layout panel defines a labels components, their text content, and if they have a border. The General section defines the component's name, visibility, anchor, and the anchor point's justification. Generally, the anchor point is the object it labels. This point has justification just like AutoCAD text: top, middle, bottom, right, center, and left. Anchoring the component to the feature's bottom right means the text anchors to a point to the lower right of the label's placement pick.

The Text section defines the label's text content, x and y offset, paper height, color, lineweight, and attachment to the feature anchor point set in the General section. Continuing with a feature anchor point of bottom right, the text component attaches its text justification point to the feature's point. It would be the label component's top left justification point that attaches to the feature's anchor point if wanting the text to be located below and to the right of the selected label point.

All Civil 3D label's change their size when the Annotation Scale changes. This is done to create text that is 'correct' for any viewport's annotation scale. When defining component x and y offsets, take into consideration the original label placement. If horizontal, the offsets reflect the WCS x and y directions. If placing a label whose anchor point is at the top and the text extends down, the x direction is relative to the insertion point (before the insertion point is a negative x and a positive x moves the text down).

A text component's color is one of two choices: ByLayer or ByBlock. If selecting ByLayer, the text component is the same color as the layer set in the General panel's Label Layer.

If setting a component to ByLayer or ByBlock and having set a layer or layer 0 (zero) in the General panel, the component displays the color of the layer specified in the style or in Object Layers. If selecting a color in the Layout panel, the component displays the selected color.

Border
The Border section defines a border for the component and can be round, rectangular, or rectangular with rounded ends. A border can have its own color and a user specified gap between the border and the text. To make the text content have a mask, set the border's mask, but do not make the border visible.

figure
Defining borders for your label.

Dragged State
The Dragged State panel defines the behavior of a moved label. A dragged label controls two components: a leader and the label. If dragging a label from its original position, it can display a leader. The leader settings define it shape, arrow head, color, and visibility. Many labels will not have a leader component when they move.

The Dragged State component defines what the label does when dragging it from its original position. The most critical setting in this section is Display. This setting defines what happens to a dragged label. The first option for Display is As Composed. This value makes the dragged label remain as it was defined when relocating it. For some labels, this is not a desirable behavior. For example, a curve segment label with curved text. If dragging this label to a new location, it is not desirable to retain the curved text and their composition when attached to a curve. In this case it is desirable to have the text transform to left justified text (individual lines of text similar to the text created by AutoCAD's text command).

A label style uses a dialog box with four tabs: Information, General, Layout, and Dragged State. Each panel controls a unique label area and receives default values many from settings at the drawing or feature level. The Information panel defines the label's name. The General panel defines a label's layer, text style, anchor point, and plan view behavior. The Layout panel defines the label's components and their properties. The Dragged State panel defines how the label behaves when relocating it in a drawing.

The next article reviews defining and formatting a label component.

Description Key Sets and Point Styles, Part 2

Last month's tutorial reviewed the point style. A point style defines the marker at a point's coordinates. This month's tutorial starts the review of the point label style. A point label style defines what properties show adjacent to a marker. A point label style attaches to the feature (coordinates) and the attachment definition is the same as defining AutoCAD text justifications (top, middle, bottom, etc.). A point's label, like all Civil 3D labels, changes its text size when changing a view's plotting scale.

Label Settings
Point label styles use drawing or point branch values accessible from the Edit Label Style Defaults dialog box. If the points branch does not change any of settings in the Edit Label Style Defaults dialog box, they are those set at the drawing level. The dialog box's Child Override column indicates if any styles below this settings tree's location use different values. If overridden, a blue down arrow appears in the column. When clicking on the blue arrow, a red X appears. If selecting apply or exiting the dialog box, all styles using a different value are set to this dialog box's value.

table
The Edit Label Style Defaults dialog box.

If wanting all label styles to start out the same, set these values at the drawing level and do not modify them for any one object type's branch. If wanting point label styles to use different values from other object types, change their values in the point branch's Edit Label Style Defaults dialog box.

The Edit Label Style Defaults dialog box has six sections. The first four affect the label's composition and initial behavior. The last two define a label's behavior if it is moved from its original location.

Label
This section sets the label's text style, visibility, and layer. If toggling off visibility, all style instances do not display. The layer entry defines the label's components layer. All label components use the same layer, but each component can have a different color assignment.

Behavior
Object reference defines how a label orients itself in the drawing. By default all labels orient themselves to the object they label. However, you can also make a label orient itself to the World Coordinate System's (WCS) 0 (zero) direction or have the label's orientation based on the current view. In this case the label is always horizontal.

Forced Insertion
The default value is none. An example of forced insertion is having pipe labels above or below a pipe segment.

Forced Inside Curve
The default value for this is false or as defined in the label. When set to true, the label is placed inside the curve with the components maintaining the same offset and rotation. This setting has precedence over the Forced Insertion value and is active only if Orientation Reference is set to Object.

Plan Readability
This section's values affect when labels flip to be left to right readable. Plan Readability can be on or off; it is on by default. The readability bias is the amount of rotation it takes for a label to flip. In the left image of the figure below, the initial label placement reads left to right. In the left image of the figure, when rotating the view more than 110 degrees, the text flips to be plan readable.

table
The Plan Readability feature.

Flip Anchors with Text
When a label flips to be plan readable, does its anchoring point also change? It is not often that this value is set to true. The default, false, keeps the original anchoring points, but mirrors the text so that it is readable.

Components
This section's values assign a label's component its default text size, color, linetype, and lineweight. When defining a new label component, it uses these values as its defaults.

Leader
When moving a label from its initial location, does the label have a leader pointing to its original label position? If it does have a leader, this section defines the leader's arrowhead size and style, visibility, type, color, linetype, and lineweight.

Dragged State Components
When dragging a label from its initial position, what happens to the label components? A dragged label has two possible states: stacked text and as composed. If Display is set to stacked text, the label displays as stacked left justified text when moved from its original position (left image of the figure below). If Display is set to as composed, a dragged label remains as it was originally defined in it new location (right image of figure below). The remaining settings affect the label's display: border, mask, background mask, border and text gap, text height, leader justification, color, linetype, and lineweight.

table
Dragged state of Stacked Text and As Composed options.

Point Labels
A point label style uses the same interface as all Civil 3D label styles: Label Style Composer and Text Component Editor. When creating a label, you need to define its behavior when it is placed in the drawing (layout) and how it will react to being moved to a new location (dragged state). A point label accesses more properties than the traditional point number, elevation, and description. The figure below shows the list of point properties available to a point label style. Additional label properties come from expressions and user-defined attributes. When you define them, they display on the properties list.

table
Point Label properties.

When creating a label from the shortcut menu's New routine, the label's initial values are from the Edit Label Style defaults. A new point label has three initial components: point number, elevation, and description. You then should go to each component's panel and adjust its values. When copying an existing point style, you start with its settings and modify them as needed.

A point label style's default values come from the drawing's or point branch's default label style settings. Each branch has its own default settings, and varying those values make the branch's styles different from other object types. The setting's values affect text styles, visibility, attachment, readability, and more. It is essential that you describe the behavior of the label before attempting to define it.

In the next tutorial, I will create a new style and define and modify its components.

Description Key Sets and Point Styles

A point style defines its name, its marker, its 3D geometry, and layers and their properties.
In the continuing discussion of styles, points are the first stop in an in-depth look at styles. Point styles are simple, but their use in any one project can be complex. With the emergence of GIS, point observations have become more than mere point number, elevation, and description. Sometimes additional attributes need identification along with a point's coordinates. These attributes can be collected as parameters or user-defined attributes. Points are also a project's bookends; they describe the existing conditions and define the future location of important design elements.

Point Styles
Civil 3D uses point styles to represent observed existing feature coordinates or critical design points. Whether the point styles represent observed or design coordinates, their coding should be consistent from project to project. Consistent names make the assignment of styles and creation of point groups a simple decision-making process.

A point's field description is known as a code or raw description. This code tends to be shorthand for a longer description, such as UP for utility pole, C 6 for coniferous tree with a 6" diameter, and so on. The longer description is known as a full description. The full description appears in a drawing.

A point style defines its name, what marker to display, its size, its 3D geometry behavior, and what layers it uses. The point style name is set in the point style's Information panel. Marker This panel in the point style dialog box defines the marker's display, size, and orientation. A marker can be an AutoCAD node, in which case the system variables PDMODE (point display mode) and PDSIZE (point display size) affect its display.

If the marker is a custom marker, it is under the control of Civil 3D settings. A custom marker replicates the PDMODE display shapes and can be one of the following: a node, a plus sign, an X, a short vertical line segment, or nothing. In addition to the basic shape, a marker can add a circle or a square.

Many times a marker denotes more than an observation; it can be a tree, a traffic signal, a sign, etc. In this case a simple marker is not enough; we need a symbol at the coordinates. The marker panel's lower right displays and identifies the symbol. All symbols must be in the drawing (template) as block definitions. The block viewer lists all of the drawing's blocks, and when you select a definition, the viewer displays it along with a label at the panel's right side.

Click for larger image The Marker tab in the Point Style - Basic dialog box.

After identifying the marker shape you must size and define its orientation. The focus then shifts to the panel's upper right.

When determining a marker's size, you have four possible choices: drawing scale, fixed scale, absolute units, and size relative to the screen. The default sizing method is drawing scale. All sizing methods use the marker's size value.

Drawing scale determines the marker size by multiplying the symbol size by the viewport plotting scale. For the Benchmark point style, the symbol size would be 4 feet when the plotting scale is 1" = 40'. This size changes when the viewport plot scale changes (model or layout).

When you use the fixed-scale option, the fixed-scale area becomes active and you set the x, y, and z scaling factors.

When absolute units are used, the symbol does not need scaling; it remains the same size no matter the plotting scale. An example of this style is a tree canopy or a manhole grate. A tree canopy study plots as absolute units the size of a tree's canopy. Regardless of the plotting scale, its size does not change. The same goes for a manhole grate. If it is critical that the grate always shows its actual measurements, it is drawn in at actual size and is not scaled.

The last method automatically scales the symbols as a percentage of the display's vertical height. If set, the size value to the right changes to a percentage. When zooming in or out, the points resize by multiplying the display height by the percent. For example, if the percentage is 3 and the display height is 100, the marker size is 3 units. If the display height is 1000, the marker size is 30.

Orientation
A marker's orientation is a result of its rotation angle and its orientation reference. The rotation angle rotates the marker regardless of its orientation reference. For example, setting the rotation angle to 45 rotates the marker counterclockwise 45 degrees.

Orientation reference (the second setting) has three possible values: Object, View, and World Coordinate System (WCS). When set to WCS, the marker's rotation is relative to WCS's zero direction even if the view is rotated. When orientation is set to Object, the marker rotates relative to its attached object. For example, placing markers on an alignment, the markers rotate in the direction of the alignment. When orientation is set to View, the markers rotate horizontally in a view.

3D Geometry
The 3D Geometry setting affects the elevations produced when a point is referenced. The three possible settings are Use Point Elevation, Exaggerate Points by Scale Factor, and Flatten Points to Elevation. When set to Use Point Elevation, referencing the point creates an object with the point's elevation.

When setting the value to Exaggerate Points by Scale Factor, referencing the point creates an object with an exaggerate elevation. For example, if the point's original elevation is 375 and the scale value is 2, the results will be an object with an elevation of 750.

When a value is set to Flatten Points to Elevation, the flatten elevation is assigned to the resulting object. This is only if the reference is with an AutoCAD object snap. For example, a point's elevation is 375 and flatten to elevation is set to 0 (zero). If drawing a line selecting the point object with an AutoCAD node object snap results in a line with an elevation of 0 (zero). If referencing the point with a point filter (point number or point object), the elevation of the resulting object is the point's elevation (375).

Click for larger image The 3D Geometry tab in the Point Style - Basic dialog box.

Display
The Display panel sets the layers for a point style's components and its view direction. A point style has two components (marker and a label) and two view directions (2D and 3D).

The point style assigns a layer for each component. The style can override any of the layer's properties (color, linetype, line type scale, or line weight). If you want the Layer Properties Manager to control these values, they should all be set to Bylayer. When you place a point and assign a label, the marker displays on the marker layer and the label on the label layer. If you want the same layers for the 3D view, you must assign the layers with view direction set to 3D.

To change the assigned layer, click the layer name and the Select Layer dialog box will display the current drawing's layer list. If the layer does not exist, the New button at Select Layer's top right creates a new layer in the drawing. If other drawings are open, you can select layers from those drawing by selecting them from the Layer Source dropdown list.

Click for larger image The Display panel of the Point Style - Basic dialog box.

Now you know the basics of the point style and its settings. A point style defines its name, its marker, its 3D geometry, and layers and their properties. Next time I will review point label styles and their properties.