Может кто-нибудь сталкивался с подобной задачей - Как список Part Size в Part Family для Part List трубопровода?
Есть пример
http://adndevblog.typepad.com/infrastructure/2013/03/pipe-network-along-water-drop-path.htmlв котором Part Size получается как
Dim partFam As PartFamily = trans.GetObject(idFamily, OpenMode.ForRead)
For i As Integer = 0 To partFam.PartSizeCount - 1
Dim size As PartSize = trans.GetObject(partFam.Item(i), OpenMode.ForRead)
Мой код на C# для NET.2014 по аналогии с примером
Network netwrk = ts.GetObject(NetworkId, OpenMode.ForRead) as Network;
ObjectId PartsListId = netwrk.PartsListId;
PartsList partlist = ts.GetObject(PartsListId, OpenMode.ForRead) as PartsList;
ObjectIdCollection famileIds = partlist.GetPartFamilyIdsByDomain(DomainType.Pipe);
foreach (ObjectId id in famileIds)
{
PartFamily partfamily = ts.GetObject(id, OpenMode.ForRead) as PartFamily;
for (int s = 0; s < partfamily.PartSizeCount; s++)
{
PartSize size = ts.GetObject(partfamily.Item(s), OpenMode.ForRead) as PartSize;
}
}
Error - 'Autodesk.Civil.DatabaseServices.Styles.PartFamily' does not contain a definition for 'Item' and no extension method 'Item' accepting a first argument of type 'Autodesk.Civil.DatabaseServices.Styles.PartFamily' could be found (are you missing a using directive or an assembly reference?)