Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 7260

[CONNECT C++] Correlating an Element with its DgnElementSchema class name

$
0
0
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?


Viewing all articles
Browse latest Browse all 7260

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>