//Link to a Property on this element ElementId elemIdLink = ElementIDLink; ElementHandle elemLink(elemIdLink, pActiveModel); if (!elemLink.IsValid()) { return false; } ElementECClassInfo ecClassInfo2; DgnECManagerR ecManager = DgnECManager::GetManager(); ecManager.FindECClassesOnElement(elemLink.GetElementRef(), ecClassInfo2); //how would i loop ecClassInfo2 to find the item type i want? //need to figure out how to get classes ecManager.FindInstanceOnElement(elemLink, ecClass2); //this is wrong
trying to figure out how to do this..
I need to get the ec instance of an item type instance that is attached to an element.
I need this to add a text field to a text element via TextField::CreateForElement.
im struggling on how to do that...
John Drsek said:I need to get the ec instance of an item type instance that is attached to an element
This article about EC Queries may help. It distils tips that Paul Connelly and others have given over the years. You need to create a scope and a query before calling DgnECManager::FindInstances.
DgnECManager::FindInstances
Regards, Jon Summers LA Solutions
Answer Verified By: John Drsek