PartSize Class

Pipe network part size filter.
Inheritance Hierarchy
SystemObject
  SystemMarshalByRefObject
    DisposableWrapper
      RXObject
        Drawable
          DBObject
            Autodesk.Civil.DatabaseServicesDBObject
              Autodesk.Civil.DatabaseServices.StylesPartSize

Namespace: Autodesk.Civil.DatabaseServices.Styles
Assembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.8.0.292
Syntax
public sealed class PartSize : DBObject

The PartSize type exposes the following members.

Properties
 NameDescription
Public propertyApplication Gets the Application associated with the DBObject. Not implemented.
(Inherited from DBObject)
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 propertyMaterialStyleId Gets or sets the object id of the material style to apply side by side with the part size.
Public propertyName Gets or sets the name.
(Inherited from DBObject)
Public propertyPartStyleId Gets or sets the object id of the part style to apply side by side with the part size.
Public propertyPayItems Gets or Sets the payitem list.
Public propertyRulesStyleId Gets or sets the object id of the rule set style to apply side by side with the part size.
Public propertySizeDataRecord Gets the serialized catalog part size record.
Top
Remarks
To edit the value of a PartDataField in a PartSize.SizeDataRecord, you must open the PartSize for write, get a reference to the object's SizeDataRecord property (type PartDataRecord), modify the PartDatafield value, and then re-set the PartSize object's PartData. See the example code.
Example
C#
 1[CommandMethod("testSizeDataRecord")]
 2public void testSizeDataRecord () {
 3    Transaction ts = Application.DocumentManager.MdiActiveDocument.Database.TransactionManager.StartTransaction();
 4
 5    PartsListCollection col = CivilApplication.ActiveDocument.Styles.PartsListSet;
 6    PartsList partList1 = ts.GetObject(col["Standard"], OpenMode.ForWrite) as PartsList;
 7    PartFamily partFamily = ts.GetObject(partList1["Concrete Pipe"], OpenMode.ForWrite) as PartFamily;
 8    PartSize partSize = ts.GetObject(partFamily["12 inch Concrete Pipe"], OpenMode.ForWrite) as PartSize;
 9
10    // Save a reference to the SizeDataRecord to restore later.
11    PartDataRecord record = partSize.SizeDataRecord;
12    PartDataField field = record.GetDataFieldBy(PartContextType.MinCurveRadius);
13    field.Value = 1.0;
14    double newVal = ( double )field.Value;
15
16    // Re-set the SizeDataRecord property.  The data will not be saved without this step.
17    partSize.SizeDataRecord = record;
18
19    ts.Commit();
20}
See Also