Surface |
Exception | Condition |
---|---|
ArgumentException | Thrown when the breakline file is invalid. |
1/// <summary> 2/// Illustrates importing breaklines 3/// </summary> 4[CommandMethod("ImportBreaklines")] 5public void ImportBreaklines() 6{ 7 using (Transaction ts = Application.DocumentManager.MdiActiveDocument.Database.TransactionManager.StartTransaction()) 8 { 9 // Prompt the user to select a TIN surface, and import breaklines from a file 10 ObjectId surfaceId = promptForEntity("Select a TIN surface to add a breakline to", typeof(TinSurface)); 11 TinSurface oSurface = surfaceId.GetObject(OpenMode.ForWrite) as TinSurface; 12 string breaklines = "eg1.flt"; 13 oSurface.BreaklinesDefinition.ImportBreaklinesFromFile(breaklines); 14 15 // commit the transaction 16 ts.Commit(); 17 } 18}