This class encapsulates the properties of a watershed area in a surface watershed analysis.
Namespace: Autodesk.Civil.DatabaseServicesAssembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.4.2516.0
Syntax
C# |
---|
public sealed class SurfaceAnalysisWatershedData : ISurfaceAnalysis |
Visual Basic |
---|
Public NotInheritable Class SurfaceAnalysisWatershedData _ Implements ISurfaceAnalysis |
Visual C++ |
---|
public ref class SurfaceAnalysisWatershedData sealed : ISurfaceAnalysis |
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.
Examples

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}
Inheritance Hierarchy
System..::..Object
Autodesk.Civil.DatabaseServices..::..SurfaceAnalysisWatershedData
Autodesk.Civil.DatabaseServices..::..SurfaceAnalysisWatershedData