CorridorExportSolids Method

Export solids from the corridor and save to target database.

Namespace: Autodesk.Civil.DatabaseServices
Assembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.8.0.292
Syntax
public ObjectIdCollection ExportSolids(
	ExportCorridorSolidsParams params,
	Database targetDatabase
)

Parameters

params  ExportCorridorSolidsParams
The specified parameters used to export solids.
targetDatabase  Database
Solids will be saved to target database, null for current database.

Return Value

ObjectIdCollection
Example
C#
 1// Export all solids and links from all corridors in the drawing
 2using (Transaction tr = startTransaction())
 3{
 4    var exportParams = new ExportCorridorSolidsParams();
 5    {
 6        // If IncludedCodes is empty, means all shapes and links will be included.
 7        exportParams.IncludedCodes = new string[]{ };
 8        exportParams.ExcludedCodes = new string[]{ };
 9        exportParams.ExportShapes = true;
10        exportParams.ExportLinks = true;
11        exportParams.SweepSolidForShape = false;
12        exportParams.CreateSolidForShape = true;
13    };
14
15    foreach (var corridorId in _civildoc.CorridorCollection)
16    {
17        Corridor corridor = corridorId.GetObject(OpenMode.ForRead) as Corridor;
18        ObjectIdCollection solids = corridor.ExportSolids(exportParams, _database);
19        write($"\nExported {solids.Count} solids or bodies in {corridor.Name}.");
20    }
21
22    tr.Commit();
23}
See Also