Hello,
I'm porting an application which has a native window which tracks a MicroStation view. When dynamics (for example a smart line segment) is added to the MicroStation view, my aplication needs to be notified of those changes, and mirror them in the native window. This worked in MicroStation V8, but not in V8XM.
An old post from May 9, 2006 between Andrew Briginshaw and Keith Bentley sounds like the same issue. However, I don't see a final resolution in this post. Using a View Decoration and mdlView_setSubstituteElemFunc() was suggested. Since this was a long time ago, has anything new been added to the API which could help? mdlView_setSubstituteElemFunc is not documented in the MDL API document for 08.09.04.88.
In version 08.09.04.88 using mdlView_setSubstituteElemFunc() causes a link error: "LNK2019: unresolved external symbol _mdlView_setSubstituteElemFunc referenced".
Regards,
Susan
The function is definitely part of the MicroStation V8 XM api. Are you working in C++? If not then you will need to first port your code to Native Code. Here is a sample of the usage for the update callback function.
/*----------------------------------------------------------------------+ | | | name htmlplot_updateElementHook | | | | author BSI - DAB 1/97 | | | +----------------------------------------------------------------------*/ Private SubstituteElemStatus htmlplot_updateElementHook ( MSElementDescrH newEdPP, // <= output if element being replaced int* priorityP, // <= priority if element being defered IViewportP viewPortP, DrawPurpose drawPurpose, IViewContextP context, // => view context bool allowDefer, // => whether element can be defered ElemHandleCP elemIterP // => elem-iter for current element if descriptor is needed ) {
/*Your work goes here */
}
/*----------------------------------------------------------------------+ | | | name htmlplot_reload | | | | author BSI - DAB 10/96 | | | +----------------------------------------------------------------------*/ Private void htmlplot_reload ( int argc, char *argv[] ) { //mdlView_setFunction (UPDATE_EACH_ELEMENT, htmlplot_updateElementHook); mdlView_setSubstituteElemFunc ((ViewFunc_SubstituteElem)htmlplot_updateElementHook); mdlView_setFunction (PLOTUPDATE_FINISHED, htmlplot_postProcess); }
HTH,
Mark Anderson [Bentley]
mark anderson [Bentley]
Visit me at https://communities.bentley.com/communities/other_communities/bentley_innovation/default.aspx