Creates a new instance of a SpanningPipeLabel that spans a specified collection of parts with the specified label style.

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

Syntax

C#
public static ObjectId Create(
	ObjectIdCollection partIds,
	ObjectId anchorPipeId,
	double ratio,
	ObjectId labelStyleId
)
Visual Basic
Public Shared Function Create ( _
	partIds As ObjectIdCollection, _
	anchorPipeId As ObjectId, _
	ratio As Double, _
	labelStyleId As ObjectId _
) As ObjectId
Visual C++
public:
static ObjectId Create(
	ObjectIdCollection^ partIds, 
	ObjectId anchorPipeId, 
	double ratio, 
	ObjectId labelStyleId
)

Parameters

partIds
Type: ObjectIdCollection
An ObjectIdCollection of the Parts which need spanning.
anchorPipeId
Type: ObjectId
The ObjectId of the Pipe in which the label is located.
ratio
Type: System..::..Double
The relative position of the label to the pipe.
labelStyleId
Type: ObjectId
The ObjectId of a SpanningPipeLabel style to use.

Remarks

  1. If a path that crosses each item in partIds can be calculated, each pipe on the path will be spanned.
  2. If the path that crosses two adjacent items in partIds crosses back on the starting part to form a loop, the spanned part in the loop is abandoned.

Exceptions

ExceptionCondition
System..::..ArgumentException Thrown when:
  • The anchorPipeId or labelStyleId is invalid.
  • The items in partIds are not in same PipeNetwork.
  • A path that crosses two adjacent items in partIds can not be found.
  • The ratio is out of range.

See Also