Hi @NoelRico
For best answer , can you attached example drawing
Note , can you use this code with some changes
Looking at it
https://forums.autodesk.com/t5/civil-3d-customization/read-property-data-from-an-entity/m-p/6393069
CivilDocument doc = Autodesk.Civil.ApplicationServices.CivilApplication.ActiveDocument;
Document acDoc = acDocMgr.MdiActiveDocument;
Database acCurDb = acDoc.Database;
using (System.IO.StreamWriter sw = new StreamWriter(@"d:\output.txt", true))
using (Transaction ts = Application.DocumentManager.MdiActiveDocument.Database.TransactionManager.StartTransaction())
{
ObjectIdCollection pipeNetworkIds = doc.GetPipeNetworkIds();
foreach (ObjectId pipeNetworkId in pipeNetworkIds)
{
Network oNetwork = ts.GetObject(pipeNetworkId, OpenMode.ForWrite) as Network;
ObjectIdCollection pipeIds = oNetwork.GetPipeIds();
foreach (ObjectId pipeId in pipeIds)
{
Pipe oPipe = ts.GetObject(pipeId, OpenMode.ForWrite) as Pipe;
ObjectIdCollection setIds = PropertyDataServices.GetPropertySets(oPipe);
foreach (ObjectId psId in setIds)
{
PropertySet pset = ts.GetObject(psId, OpenMode.ForRead, false, false) as PropertySet;
PropertySetDefinition psd = ts.GetObject(pset.PropertySetDefinition, OpenMode.ForRead) as PropertySetDefinition;
foreach (PropertyDefinition pd in psd.Definitions)
{
int propertyId=pset.PropertyNameToId(pd.Name);
object value = pset.GetAt(propertyId);
sw.WriteLine("Handler: " + oPipe.Handle.ToString() + "; " + pd.Name + ": " + value.ToString().Trim());
}
//PropertySetDataCollection psetDataColl = pset.PropertySetData;
//PropertySetData pPropData;
//for (int c = 0; c < psetDataColl.Count; c++)
//{
// pPropData = psetDataColl[c];
// object data = pPropData.GetData();
//}
}
sw.WriteLine(System.Environment.NewLine);
}
}
}