SurfaceDefinitionBreaklines.ImportBreaklineFromFile() を使用すると、.FLT 形式のファイルからブレークラインを読み込むことができます。ファイルを読み込むとき、[ブレークラインの追加]操作で、FLT ファイル内のすべてのブレークラインがサーフェスにコピーされ、ファイルへのリンクは保持されません。このオプションは、API で使用できないファイルへのリンクを保持するために、GUI 上で使用することができます。
次の例では、eg1.flt という名前のファイルからブレークラインを読み込み、最初に新規作成されたブレークラインを取得する方法を示します。
[CommandMethod("ImportBreaklines")] public void ImportBreaklines() { using (Transaction ts = Application.DocumentManager.MdiActiveDocument.Database.TransactionManager.StartTransaction()) { // Prompt the user to select a TIN surface and a polyline, and create a breakline from the polyline ObjectId surfaceId = promptForEntity("Select a TIN surface to add a breakline to", typeof(TinSurface)); TinSurface oSurface = surfaceId.GetObject(OpenMode.ForWrite) as TinSurface; string breaklines = "eg1.flt"; oSurface.BreaklinesDefinition.ImportBreaklinesFromFile(breaklines); // commit the transaction ts.Commit(); } }