PondContourCollectionSet(PondContour) Method

Sets (replaces) an existing contour in the collection, or adds it if not present.

Namespace: Autodesk.Civil.DatabaseServices
Assembly: AeccDrainageDesignMgd (in AeccDrainageDesignMgd.dll) Version: 13.9.960.0
Syntax
public void Set(
	PondContour contour
)

Parameters

contour  PondContour
The contour to set in the collection.
Exceptions
ExceptionCondition
ArgumentNullExceptionThrown when the contour is null.
Remarks

Upsert behavior: If a contour with the same ID already exists, it will be replaced. If no contour with the ID exists, the contour will be added to the collection.

Snapshot pattern integration: This method is essential for the snapshot workflow. Since retrieved contours are independent copies, this method provides the mechanism to update the collection with modified geometry while preserving contour IDs.

Typical Workflow:

C#
1var original = collection[id];                    // Get copy
2var modified = new PondContour(newGeometry, id);  // Create modified version
3collection.Set(modified);                         // Update collection
See Also