ExportCorridorSolidsParams Class

Encapsulates the parameters that are necessary to export solids from a corridor.
Inheritance Hierarchy
SystemObject
  Autodesk.Civil.DatabaseServicesExportCorridorSolidsParams

Namespace: Autodesk.Civil.DatabaseServices
Assembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.8.0.292
Syntax
public class ExportCorridorSolidsParams

The ExportCorridorSolidsParams type exposes the following members.

Constructors
 NameDescription
Public methodExportCorridorSolidsParams Default constructor.
Top
Properties
 NameDescription
Public propertyCreateSolidForShape Gets or sets the flag to export solid or body for shapes
Public propertyCode exampleExcludedCodes Gets or sets the excluded codes for shapes or links If one of ExcludedCodes exists, the shape or link is excluded. If one of ExcludedCodes contains multiple codes like "Top, Pave", it means only if these 2 codes both exist then the shape or link will be excluded.
Example
C#
 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}
Public propertyExportLinks Gets or sets the flag to export links
Public propertyExportShapes Gets or sets the flag to export shapes
Public propertyCode exampleIncludedCodes Gets or sets the included codes for shapes or links If one of IncludedCodes exists, the shape or link is included. If one of IncludedCodes contains multiple codes like "Top, Pave", it means if these 2 codes both exist then the shape or link will be included.
Example
C#
 1// Export solids from 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. Or if "Pave1" exists, it is included.
 7        exportParams.IncludedCodes = new string[] { "Top, Datum", "Pave1" };
 8        // If "Daylight" or "Ditch" exists, it is excluded.
 9        exportParams.ExcludedCodes = new string[] { "Daylight", "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].ExportSolids(exportParams, _database);
18    write($"\nExported {solids.Count} solids or bodies.");
19
20    tr.Commit();
21}
Public propertySweepSolidForShape If shapes are exported as solid, gets or sets the flag to use sweep method or not
Top
Remarks
One shape or link will be exported or not depends on: 1.) all codes in IncludedCodes could be found in its codes collection. 2.) all codes in ExcludedCodes couldn't be found in its codes collection. 3.) if one code is found in both IncludedCodes and ExcludedCodes, the shape or link includes that code won't be exported.
See Also