SurfaceAnalysisWatershedData Class |
This class encapsulates the properties of a watershed area in a surface watershed analysis.
Inheritance HierarchySystemObject
Autodesk.Civil.DatabaseServicesSurfaceAnalysisWatershedData
Namespace: Autodesk.Civil.DatabaseServicesAssembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.8.0.292
Syntaxpublic sealed class SurfaceAnalysisWatershedData
Public NotInheritable Class SurfaceAnalysisWatershedData
public ref class SurfaceAnalysisWatershedData sealed
The SurfaceAnalysisWatershedData type exposes the following members.
Properties | Name | Description |
---|
 | AreaColor |
Gets or sets the color value for the watershed area.
|
 | AreaHatchPatternName |
Gets or sets the hatch pattern name for the watershed area.
|
 | AreaID |
Gets the area ID for the watershed area.
|
 | Description |
Gets or sets the description.
|
 | DrainsInto |
Gets an array of watershed IDs that the watershed drains into.
|
 | SegmentColor |
Gets or sets the color value for the watershed.
|
 | SegmentLineTypeId |
Gets or sets the ObjectId of the line type for the watershed area.
|
 | SegmentLineWeight |
Gets or sets the line weight for the watershed area.
|
 | Type |
Gets the watershed type.
|
 | Visible |
Gets or sets whether this watershed is displayed.
|
Top
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
2
3
4[CommandMethod("SurfaceWatershedAnalysis")]
5public void SurfaceWatershedAnalysis()
6{
7 using (Transaction ts = Application.DocumentManager.MdiActiveDocument.Database.TransactionManager.StartTransaction())
8 {
9
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