Adds non-destructive breaklines to a surface from a collection of entities.

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

Syntax

C#
public SurfaceOperationAddBreakline AddNonDestructiveBreaklines(
	ObjectIdCollection breaklineEntities,
	double midOrdinateDistance
)
Visual Basic
Public Function AddNonDestructiveBreaklines ( _
	breaklineEntities As ObjectIdCollection, _
	midOrdinateDistance As Double _
) As SurfaceOperationAddBreakline
Visual C++
public:
SurfaceOperationAddBreakline^ AddNonDestructiveBreaklines(
	ObjectIdCollection^ breaklineEntities, 
	double midOrdinateDistance
)

Parameters

breaklineEntities
Type: ObjectIdCollection
A collection of ObjectIds for entities used to create breaklines.
midOrdinateDistance
Type: System..::..Double
When the breakline is defined from a polyline with curves, the midOrdinateDistance value is used to tessellate the arcs in the polyline.

Remarks

When defining a non-destructive breakline, surface points are created at each vertex of the object and at each intersection of a surface triangle edge and the non-destructive breakline object.

Examples

CopyC#
 1/// <summary>
 2/// Illustrates creating breaklines
 3/// </summary>
 4[CommandMethod("SurfaceBreaklines")]
 5public void SurfaceBreaklines()
 6{
 7    using (Transaction ts = Application.DocumentManager.MdiActiveDocument.Database.TransactionManager.StartTransaction())
 8    {
 9        // Prompt the user to select a TIN surface and a polyline, and create a breakline from the polyline
10
11        ObjectId surfaceId = promptForEntity("Select a TIN surface to add a breakline to", typeof(TinSurface));
12        ObjectId lineId = promptForEntity("Select a 3D polyline to use as the breakline", typeof(Polyline3d));
13        TinSurface oSurface = surfaceId.GetObject(OpenMode.ForWrite) as TinSurface;
14        ObjectId[] lines = { lineId };
15
16        PromptKeywordOptions pKeyOpts = new PromptKeywordOptions("");
17        pKeyOpts.Message = "\nEnter the type of breakline to create: ";
18        pKeyOpts.Keywords.Add("Standard");
19        pKeyOpts.Keywords.Add("Non-Destructive");
20        pKeyOpts.Keywords.Add("Proximity");
21        pKeyOpts.Keywords.Default = "Standard";
22        pKeyOpts.AllowNone = true;
23        PromptResult pKeyRes = editor.GetKeywords(pKeyOpts);
24
25        try
26        {
27            switch (pKeyRes.StringResult)
28            {
29                case "Non-Destructive":
30                    oSurface.BreaklinesDefinition.AddNonDestructiveBreaklines(new ObjectIdCollection(lines), 1);
31                    break;
32                case "Proximity":
33                    oSurface.BreaklinesDefinition.AddProximityBreaklines(new ObjectIdCollection(lines), 1);
34                    break;
35                case "Standard":
36                default:
37                    oSurface.BreaklinesDefinition.AddStandardBreaklines(new ObjectIdCollection(lines), 10, 5, 5, 0);
38                    break;
39            }
40        }
41
42        catch (System.Exception e)
43        {
44            editor.WriteMessage("Operation failed: {0}", e.Message);
45        }
46
47        // commit the transaction
48        ts.Commit();
49    }
50}

Exceptions

ExceptionCondition
System..::..ArgumentException Thrown when:
  1. There is an invalid ObjectId in the breaklineEntities collection.
  2. midOrdinateDistance <= 0.0.

See Also