ShapeStyle Class

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
SystemObject
  SystemMarshalByRefObject
    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.292
Syntax
public sealed class ShapeStyle : SubassemblySubentityStyle

The ShapeStyle type exposes the following members.

Properties
 NameDescription
Public propertyApplication Gets the Application associated with the DBObject. Not implemented.
(Inherited from DBObject)
Public propertyAreaFillHatchDisplayStyleModelObsolete.
Public propertyAreaFillHatchDisplayStylePlanObsolete.
Public propertyCreateByGets or Sets the "Created by" string for the style.
(Inherited from StyleBase)
Public propertyDateCreatedGets the "Date created" string for the style.
(Inherited from StyleBase)
Public propertyDateModifiedGets the "Date modified" string for the style.
(Inherited from StyleBase)
Public propertyDescription Gets or sets the description.
(Inherited from DBObject)
Public propertyDocument Gets the Document associated with the DBObject. Not implemented.
(Inherited from DBObject)
Public propertyIsUsed Gets whether the style is used by other objects in the current drawing.
(Inherited from DBObject)
Public propertyModifiedByGets the "Modified by" string for the style.
(Inherited from StyleBase)
Public propertyNameSets the "Name" string for the style.
(Inherited from StyleBase)
Public propertyStyleType
(Overrides SubassemblySubentityStyleStyleType)
Top
Methods
 NameDescription
Public methodCopyAsSibling Copy the current style and add it to the parent node as a sibling.
(Inherited from StyleBase)
Public methodExportTo(Database, StyleConflictResolverType) Exports the current style to another drawing.
(Inherited from StyleBase)
Public methodGetDisplayStyleModel Gets the DisplayStyle object that specifies model display properties.
Public methodGetDisplayStylePlan Gets the DisplayStyle object that specifies plan display properties.
Public methodGetDisplayStyleProfile Gets the DisplayStyle object that specifies profile display properties.
Public methodGetDisplayStyleSection Gets the DisplayStyle object that specifies section display properties.
Public methodGetHatchDisplayStyleModel Gets the HatchDisplayStyle object that specifies model display properties.
Public methodGetHatchDisplayStylePlan Gets the HatchDisplayStyle object that specifies plan display properties.
Public methodGetHatchDisplayStyleProfile Gets the HatchDisplayStyle object that specifies profile display properties.
Public methodGetHatchDisplayStyleSection Gets the HatchDisplayStyle object that specifies section display properties.
Top
Example
C#
 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();
See Also