SurfaceAnalysisGetDirectionData Method

Gets the surface direction analysis data for a Surface.

Namespace: Autodesk.Civil.DatabaseServices
Assembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.8.0.292
Syntax
public SurfaceAnalysisDirectionData[] GetDirectionData()

Return Value

SurfaceAnalysisDirectionData
An array of SurfaceAnalysisDirectionData objects.
Remarks
This method returns direction analysis data for a Surface. Data only exists if it has been generated in the Surface Analysis tab. Directions will appear in the GUI if the direction component of the surface style are set to visible, but the analysis data will be empty. Data is generated from the Analysis tab on the Surface Properties dialog.

Use SetDirectionData() to apply changes made to data returned by this method.
Example
C#
 1[CommandMethod("DirectionAnalysis")]
 2public void DirectionAnalysis()
 3{
 4    using (Transaction ts = Application.DocumentManager.MdiActiveDocument.Database.TransactionManager.StartTransaction())
 5    {
 6        // Get the first surface in a document           
 7        ObjectId surfaceId = doc.GetSurfaceIds()[0];
 8        TinSurface oTinSurface = surfaceId.GetObject(OpenMode.ForRead) as TinSurface;
 9        foreach (SurfaceAnalysisDirectionData d in oTinSurface.Analysis.GetDirectionData())
10        {
11            editor.WriteMessage("Min dir: {0} Max dir: {1} scheme: {2} \n", d.MinimumDirection, d.MaximumDirection, d.Scheme.ColorName);
12        }
13    }
14}
See Also