Share

BaselineRegion.ExportSolids(ExportCorridorSolidsParams, Double, Double, Database) Method

Export solids from a specified range in the corridor region and save to target database.



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

Syntax

C#

public ObjectIdCollection ExportSolids(
	ExportCorridorSolidsParams params,
	double startStation,
	double endStation,
	Database targetDatabase
)

VB

Public Function ExportSolids ( 
	params As ExportCorridorSolidsParams,
	startStation As Double,
	endStation As Double,
	targetDatabase As Database
) As ObjectIdCollection

C++

public:
ObjectIdCollection^ ExportSolids(
	ExportCorridorSolidsParams^ params, 
	double startStation, 
	double endStation, 
	Database^ targetDatabase
)

Parameters

params  ExportCorridorSolidsParams
The specified parameters used to export solids.
startStation  Double
Start station of the specified range in the region.
endStation  Double
End station of the specified range in the region.
targetDatabase  Database
Solids will be saved to target database, null for current database.

Return Value

ObjectIdCollection

Example

 1// Export solids from the first region of the first baseline of a corridor
 2using (Transaction tr = startTransaction())
 3{
 4    var exportParams = new ExportCorridorSolidsParams();
 5    {
 6        // If both "Top" and "Datum" exist, it is included.
 7        exportParams.IncludedCodes = new string[] { "Top, Datum"};
 8        // If both "Daylight" and "Datum" exist, it is excluded. Or if "Ditch" exists, it is excluded.
 9        exportParams.ExcludedCodes = new string[] { "Daylight, Datum", "Ditch" };
10        exportParams.ExportShapes = true;
11        exportParams.ExportLinks = true;
12        exportParams.SweepSolidForShape = false;
13        exportParams.CreateSolidForShape = true;
14    };
15
16    Corridor corridor = corridorId.GetObject(OpenMode.ForRead) as Corridor;
17    ObjectIdCollection solids = corridor.Baselines[0].BaselineRegions[0].ExportSolids(exportParams, _database);
18    write($"\nExported {solids.Count} solids or bodies.");
19
20    tr.Commit();
21}

See Also

Reference

Was this information helpful?