The Assembly class represents a corridor assembly in Civil3D, which defines the cross-sectional template for a corridor.
Autodesk.Civil.DatabaseServices
System.Object
└─ RXObject
└─ DBObject
└─ Entity
└─ Assembly
| Property | Type | Description |
|---|---|---|
Name |
string |
Gets/sets the assembly name |
Description |
string |
Gets/sets the description |
CodeSetStyleId |
ObjectId |
Gets/sets the code set style |
using (Transaction tr = civilDoc.Database.TransactionManager.StartTransaction())
{
ObjectIdCollection assemblyIds = civilDoc.GetAssemblyIds();
ed.WriteMessage($"\nFound {assemblyIds.Count} assemblies:");
foreach (ObjectId assemblyId in assemblyIds)
{
Assembly assembly = tr.GetObject(assemblyId, OpenMode.ForRead) as Assembly;
ed.WriteMessage($"\n {assembly.Name}");
if (!string.IsNullOrEmpty(assembly.Description))
{
ed.WriteMessage($" - {assembly.Description}");
}
}
tr.Commit();
}- Corridor - Uses assemblies for cross-sections
- CivilDocument - Container for assemblies