StageDesignCollectionAdd Method

Adds a new item to the collection at the specified depth.

Namespace: Autodesk.Civil.DatabaseServices
Assembly: AeccDrainageDesignMgd (in AeccDrainageDesignMgd.dll) Version: 13.9.960.0
Syntax
public StageDesignItem Add(
	double depth
)

Parameters

depth  Double
The depth value for the new item. Must be greater than 0.

Return Value

StageDesignItem
The newly created StageDesignItem.
Exceptions
ExceptionCondition
ArgumentOutOfRangeException Thrown when depth is less than or equal to 0. Parameter name: depth
ArgumentException Thrown when a item with the same depth already exists. Parameter name: depth
Remarks
The new item is automatically inserted in the correct position to maintain depth sorting. All volume calculations in the design table are automatically updated when an item is added.

Example:

C#
1var designTable = ugs.GetStageDesign();
2var newItem = designTable.Add(2.5); // Add item at 2.5m depth
3newItem.VoidRatio = 0.4; // Set void ratio to 40%
4ugs.SetStageDesign(designTable); // Save changes
See Also