A single data record for a Part object.
Inheritance HierarchySystemObject
Autodesk.Civil.DatabaseServicesPartDataRecord
Namespace: Autodesk.Civil.DatabaseServicesAssembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.8.0.292
Syntaxpublic sealed class PartDataRecord : IDisposable
Public NotInheritable Class PartDataRecord
Implements IDisposable
public ref class PartDataRecord sealed : IDisposable
The PartDataRecord type exposes the following members.
Methods
Remarks
To edit the value of a PartDataField, you must open the Part (Pipe or Structure) for write, get a reference to
the Part object's PartData property (type PartDataRecord), modify the PartDatafield value, and then re-set
the Part's PartData. See the example code.
A similar procedure is required for editing a PartSize. See the example code for PartSize for a sample.
Example 1[CommandMethod("pipemann")]
2public void getPipeManning () {
3 Autodesk.AutoCAD.EditorInput.Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
4 PromptEntityOptions opt = new PromptEntityOptions("\nSelect a Pipe");
5 opt.SetRejectMessage("\nObject must be a pipe.");
6 opt.AddAllowedClass(typeof(Pipe), false);
7 ObjectId pipeID = ed.GetEntity(opt).ObjectId;
8
9 CivilDocument doc = CivilApplication.ActiveDocument;
10
11 using ( Transaction ts = Application.DocumentManager.MdiActiveDocument.Database.TransactionManager.StartTransaction() ) {
12 Pipe PipeEle = ts.GetObject(pipeID, OpenMode.ForWrite) as Pipe;
13
14 PartDataRecord record = PipeEle.PartData;
15
16 PartDataField PartDataFld = record.GetDataFieldBy(PartContextType.FlowAnalysisManning);
17
18 PartDataFld.Value = 0.44;
19
20 PipeEle.PartData = record;
21 ed.WriteMessage("Manning value is now: {0}", PartDataFld.Value);
22 ts.Commit();
23 }
24}
See Also