[CONNECT c++] get EC instance of itemtype on element?

    //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...

Parents Reply Children
No Data