With Update 13, the XAttributeChangedEvent now has the XAttribute Property but
eventArgs.XAttribute.IDeventArgs.XAttribute.HandlerId
both give me the same value 0x17010000.I've created the Element in V8i and used it for CE.With V8i I can look at the xAttribute directly, like in the Screenshot but with CE this is not possible.There is a workaround for this over native and there I get the right values I look for.
XAttributeHandle XAttrHandle = XAttributeHandle(p_ElemRefIn, h_XAttr, XAttributeHandle::MATCH_ANY_ID); UInt32 un_XAttrId = XAttrHandle.GetId();
Jean-Pierre Hundhausen said:both give me the same value 0x17010000.
It seems no Quality Assurence (API testing) is used when API is implemented :-(
Jean-Pierre Hundhausen said:I do not know what happens with multiply xAttributes.
I guess multiple events are thrown in such situation?
Jean-Pierre Hundhausen said:Switching from manged to native takes some time.
Yes, there is some overhead to cross native/managed border, and I think it's the reason why some functionality is not published or available partially only in managed API. My feeling from different discussion is that "problem" of XAttribute events is that there are huge amount of them at background (even simple element modification can be followed by many XAttribute internal events), so Bentley are cautious to open it too much for NET world, because it can easily slow down MicroStation rapidly.
Regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Jan Šlegr said:Jean-Pierre Hundhausen said:Switching from manged to native takes some time. Yes, there is some overhead to cross native/managed border,
Yes, there is some overhead to cross native/managed border,
Especially, knowing the HandlerID AND ID would be enough in most cases to react properly to the event. It is so useless to jump through native-code and lose time.
Mit freundlichen Grüßen / Best regards Volker Hüfner
| AB_DATE Engineering Software | ab-date.de |