Hi,
I'm attempting to extract EC-attributes from an AutoPLANT i-model. The sample model i'm using can be downloaded from this link:
http://download.nois.no/isycad/Outgoing/autoplant_test_autoplant_schema.dwg.i.zip
This file contain only a single element, and have attributes of the type Piping Component.
I'm using the following code to extract EC-attributes, this code works fine with i-models created in MicroStation.
void attributesFromECAttribute(MSElementDescr *ElDscr, DgnModelRefP modelRef) { ElementRef elemRef; UInt32 filePos; BXN::StringListHandle slHandle; // init businessdata WString rootName("_"); Bentley::XMLInstanceAPI::Native::XmlInstanceStatus iStatus; Bentley::XMLInstanceAPI::Native::XmlInstanceApi apiRef(GetAPI(iStatus)); // read elementRef filePos = mdlElmdscr_getFilePos(ElDscr); elemRef = mdlModelRef_getElementRef(modelRef, filePos); // read the EC attributes slHandle = apiRef.ReadInstances(iStatus,elemRef); // nr of attributes int count = slHandle.GetCount(); // return 0 elements on the AutoPLANT sample model }
Reg.
Bjørn Egil Jenssen