La classe Profile représente un profil en long vertical le long d'un axe dans Civil 3D.
Autodesk.Civil.DatabaseServices
System.Object
└─ RXObject
└─ DBObject
└─ Entity
└─ Feature
└─ Profile
| Propriété | Type | Description |
|---|---|---|
Name |
string |
Obtient/définit le nom du profil |
Description |
string |
Obtient/définit la description |
AlignmentId |
ObjectId |
Obtient l'ObjectId de l'axe parent |
StartingStation |
double |
Obtient la station de départ |
EndingStation |
double |
Obtient la station de fin |
| Méthode | Type de Retour | Description |
|---|---|---|
ElevationAt(double) |
double |
Obtient l'élévation à la station |
using (Transaction tr = civilDoc.Database.TransactionManager.StartTransaction())
{
Alignment alignment = tr.GetObject(alignmentId, OpenMode.ForRead) as Alignment;
ObjectIdCollection profileIds = alignment.GetProfileIds();
if (profileIds.Count > 0)
{
Profile profile = tr.GetObject(profileIds[0], OpenMode.ForRead) as Profile;
double station = 100.0;
double elevation = profile.ElevationAt(station);
ed.WriteMessage($"\nProfil : {profile.Name}");
ed.WriteMessage($"\nÉlévation à la Station {station} : {elevation:F2}");
}
tr.Commit();
}- Alignment - Axe parent
- CivilDocument - Conteneur de document