The Trigml extension that implements an element will typically attach an object to the element in its ITRIGMLEXTENSION_ElementCreated() notification. The object can then be retrieved and manipulated in subsequent ITRIGMLEXTENSION_*() notifications by calling ITRIGMLELEMENT_GetAttachedObject().
The element will AddRef the object. It will be Released either when a new object is attached or when the element itself is destroyed. At most one object can be attached to each Trigml element.
void ITRIGMLELEMENT_AttachObject(ITrigmlElement* po, IQueryInterface* obj);