Mình xin chia sẻ 1 đoạn code cách tạo nhãn và gán nhãn cho tuyến cống trong Civil3D:
ObjectId pipeID = ed.GetEntity(opt).ObjectId;
CivilDocument civildoc = CivilApplication.ActiveDocument;
using (Transaction ts =AcadApp.DocumentManager.MdiActiveDocument.Database.TransactionManager.StartTransaction())
{
ObjectId labelStyleId = civildoc.Styles.LabelStyles.PipeLabelStyles.PlanProfileLabelStyles[0];
PipeLabel.Create(pipeID, 0.5, labelStyleId);
ts.Commit();
}
Chúc các bạn thành công!