Add a line pipe by using the geometry information of an input line.

Namespace: Autodesk.Civil.DatabaseServices
Assembly: AeccDbMgd (in AeccDbMgd.dll) Version: 10.3.488.0

Syntax

C#
public void AddLinePipe(
	ObjectId pipeFamilyId,
	ObjectId pipeSizeId,
	LineSegment3d line,
	ref ObjectId newPipeId,
	bool applyRules
)
Visual Basic
Public Sub AddLinePipe ( _
	pipeFamilyId As ObjectId, _
	pipeSizeId As ObjectId, _
	line As LineSegment3d, _
	ByRef newPipeId As ObjectId, _
	applyRules As Boolean _
)
Visual C++
public:
void AddLinePipe(
	ObjectId pipeFamilyId, 
	ObjectId pipeSizeId, 
	LineSegment3d^ line, 
	ObjectId% newPipeId, 
	bool applyRules
)

Parameters

pipeFamilyId
Type: ObjectId
Pipe family id.
pipeSizeId
Type: ObjectId
Object id of the Pipe Size.
line
Type: LineSegment3d
The line which supplies the geometry information.
newPipeId
Type: ObjectId%
Returns the object id of the added new pipe.
applyRules
Type: System..::..Boolean
Returns whether the method needed to apply rules.

Examples

CopyC#
 1ObjectIdCollection oIdCollection = doc.GetPipeNetworkIds();
 2// Get the first network in the document
 3ObjectId objId = oIdCollection[0];
 4Network oNetwork = ts.GetObject(objId, OpenMode.ForWrite) as Network;
 5ed.WriteMessage("Pipe Network: {0}\n", oNetwork.Name);
 6// Go through the list of part types and select the first pipe found
 7ObjectId pid = oNetwork.PartsListId;
 8PartsList pl = ts.GetObject(pid, OpenMode.ForWrite) as PartsList;
 9
10ObjectId oid = pl["Concrete Pipe"];
11PartFamily pfa = ts.GetObject(oid, OpenMode.ForWrite) as PartFamily;
12ObjectId psize = pfa[0];
13LineSegment3d line = new LineSegment3d(new Point3d(30, 9, 0), new Point3d(33, 7, 0));
14ObjectIdCollection col = oNetwork.GetPipeIds();
15ObjectId oidNewPipe = ObjectId.Null;
16
17oNetwork.AddLinePipe(oid, psize, line, ref oidNewPipe, false);
18Pipe oNewPipe = ts.GetObject(oidNewPipe, OpenMode.ForRead) as Pipe;
19ed.WriteMessage("Pipe created: {0}\n", oNewPipe.DisplayName);
20ts.Commit();

See Also