Share

SurfaceAnalysisWatershedData Class

This class encapsulates the properties of a watershed area in a surface watershed analysis.

Inheritance Hierarchy

SystemObject
  Autodesk.Civil.DatabaseServicesSurfaceAnalysisWatershedData


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

Syntax

C#

public sealed class SurfaceAnalysisWatershedData

VB

Public NotInheritable Class SurfaceAnalysisWatershedData

C++

public ref class SurfaceAnalysisWatershedData sealed

The SurfaceAnalysisWatershedData type exposes the following members.

Properties

 NameDescription
Public propertyAreaColor Gets or sets the color value for the watershed area.
Public propertyAreaHatchPatternName Gets or sets the hatch pattern name for the watershed area.
Public propertyAreaID Gets the area ID for the watershed area.
Public propertyDescription Gets or sets the description.
Public propertyDrainsInto Gets an array of watershed IDs that the watershed drains into.
Public propertySegmentColor Gets or sets the color value for the watershed.
Public propertySegmentLineTypeId Gets or sets the ObjectId of the line type for the watershed area.
Public propertySegmentLineWeight Gets or sets the line weight for the watershed area.
Public propertyType Gets the watershed type.
Public propertyVisible Gets or sets whether this watershed is displayed.

Remarks

This class defines a single watershed, specified by an area ID, and watershed type. It also defines the appearance of the watershed area, and contains the IDs of any other areas it drains into. A Surface watershed analysis typically contains several watershed areas. The Surface.Analysis.GetWatershedData() method returns an iterable collection of SurfaceAnalysisWatershedData objects, one for each watershed area.

Example

 1/// <summary>
 2/// Illustrates accessing a watershed analysis
 3/// </summary>
 4[CommandMethod("SurfaceWatershedAnalysis")]
 5public void SurfaceWatershedAnalysis()
 6{
 7    using (Transaction ts = Application.DocumentManager.MdiActiveDocument.Database.TransactionManager.StartTransaction())
 8    {
 9        // Select first TIN Surface              
10        ObjectId surfaceId = doc.GetSurfaceIds()[0];
11        CivSurface oSurface = surfaceId.GetObject(OpenMode.ForRead) as CivSurface;
12
13        SurfaceAnalysisWatershedDataCollection analysisData = oSurface.Analysis.GetWatershedData();
14        editor.WriteMessage("Number of watershed regions: {0}\n", analysisData.Count);
15        foreach (SurfaceAnalysisWatershedData watershedData in analysisData)
16        {
17            editor.WriteMessage("Data item AreaId: {0} \n"
18                + "Description: {1}\n"
19                + "Type: {2}\n"
20                + "Drains into areas: {3}\n"
21                + "Visible? {4}\n",
22                watershedData.AreaID, watershedData.Description, watershedData.Type,
23                String.Join(", ", watershedData.DrainsInto), watershedData.Visible);
24        }
25    }
26}

See Also

Reference

Was this information helpful?