Used to control the visual style of various roadway shape objects. Also used to style ProfileView ProfileHatchArea objects. ShapeStyle objects defined for a drawing are kept in the CivilDocument::Styles::ShapeStyles collection.
Inheritance Hierarchy
SystemObjectSystemMarshalByRefObject
DisposableWrapper
RXObject
Drawable
DBObject
Autodesk.Civil.DatabaseServicesDBObject
Autodesk.Civil.DatabaseServices.StylesStyleBase
Autodesk.Civil.DatabaseServices.StylesSubassemblySubentityStyle
Autodesk.Civil.DatabaseServices.StylesShapeStyle
Namespace: Autodesk.Civil.DatabaseServices.Styles
Assembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.8.0.280
Syntax
C#
public sealed class ShapeStyle : SubassemblySubentityStyle
VB
Public NotInheritable Class ShapeStyle Inherits SubassemblySubentityStyle
C++
public ref class ShapeStyle sealed : public SubassemblySubentityStyle
The ShapeStyle type exposes the following members.
Properties
| Name | Description | |
|---|---|---|
| Application |
Gets the Application associated with the DBObject.
Not implemented.
(Inherited from DBObject) | |
| AreaFillHatchDisplayStyleModel | Obsolete. | |
| AreaFillHatchDisplayStylePlan | Obsolete. | |
| CreateBy | Gets or Sets the "Created by" string for the style. (Inherited from StyleBase) | |
| DateCreated | Gets the "Date created" string for the style. (Inherited from StyleBase) | |
| DateModified | Gets the "Date modified" string for the style. (Inherited from StyleBase) | |
| Description |
Gets or sets the description.
(Inherited from DBObject) | |
| Document |
Gets the Document associated with the DBObject.
Not implemented.
(Inherited from DBObject) | |
| IsUsed |
Gets whether the style is used by other objects in the current drawing.
(Inherited from DBObject) | |
| ModifiedBy | Gets the "Modified by" string for the style. (Inherited from StyleBase) | |
| Name | Sets the "Name" string for the style. (Inherited from StyleBase) | |
| StyleType | (Overrides SubassemblySubentityStyleStyleType) |
Methods
| Name | Description | |
|---|---|---|
| CopyAsSibling |
Copy the current style and add it to the parent node as a sibling.
(Inherited from StyleBase) | |
| ExportTo(Database, StyleConflictResolverType) |
Exports the current style to another drawing.
(Inherited from StyleBase) | |
| GetDisplayStyleModel | Gets the DisplayStyle object that specifies model display properties. | |
| GetDisplayStylePlan | Gets the DisplayStyle object that specifies plan display properties. | |
| GetDisplayStyleProfile | Gets the DisplayStyle object that specifies profile display properties. | |
| GetDisplayStyleSection | Gets the DisplayStyle object that specifies section display properties. | |
| GetHatchDisplayStyleModel | Gets the HatchDisplayStyle object that specifies model display properties. | |
| GetHatchDisplayStylePlan | Gets the HatchDisplayStyle object that specifies plan display properties. | |
| GetHatchDisplayStyleProfile | Gets the HatchDisplayStyle object that specifies profile display properties. | |
| GetHatchDisplayStyleSection | Gets the HatchDisplayStyle object that specifies section display properties. |
Example
1// Create a new shape style and change it so that it has 2// an orange border and a yellow hatch fill. 3objId = doc.Styles.ShapeStyles.Add("Style3"); 4ShapeStyle oShapeStyle = ts.GetObject(objId, OpenMode.ForWrite) as ShapeStyle; 5// 50 = yellow 6oShapeStyle.GetDisplayStylePlan(ShapeDisplayStyleType.AreaFill).Color = Color.FromColorIndex(ColorMethod.ByAci, 50); 7oShapeStyle.GetDisplayStylePlan(ShapeDisplayStyleType.AreaFill).Visible = true; 8//oShapeStyle. GetDisplayStylePlan(ShapeDisplayStyleType.Border). HatchType = HatchType.PreDefined; 9// oShapeStyle.AreaFillHatchDisplayStylePlan.Pattern = "LINE"; 10// 30 = orange 11oShapeStyle.GetDisplayStylePlan(ShapeDisplayStyleType.Border).Color = Color.FromColorIndex(ColorMethod.ByAci, 30); 12oShapeStyle.GetDisplayStylePlan(ShapeDisplayStyleType.Border).Visible = true; 13 14ts.Commit();
