SchemaInfo schemaInfo(ECN::SchemaKey(L"DgnElementSchema", 1, 0), *pDgnFile); ECN::ECSchemaPtr pSchema = ecMan.LocateSchemaInDgnFile(schemaInfo, ... ECN::ECClassCR ecClass = *pSchema->GetClassCP(L"SomeElement");
If I want to obtain an EC property from an element, I have to substitute an element class name (e.g. ArcElement) in the above line to obtain the ECClass for that element. Is there a way to programmatically deduce the ECClass name given, say, an ElementHandle? Or do we have to maintain our own dictionary of element↔ECClass name?
For example, if ElementHandle eh (ElementId, DgnModelRefP) constructs a valid ElementHandle from an arc element, is there a method that returns the ECClass name ArcElement? Have I missed something obvious?