Hi,
this code work in V8 2004 and when i try to use it in V8i, microstation crash on the mdlDisplayPath_getInfoString.
extern "C" DLLEXPORT char* GetInfoBulle(ElementId idElt)
{
ElementRef elemRef;
DisplayPathP path ;
MSWChar chaineW[MAX_DISPLAYPATH_INFO_STRING ];
char * ret=NULL;
printf("test1\n");
elemRef = dgnCache_findElemByID(mdlModelRef_getCache(mdlModelRef_getActive()), idElt);
printf("test2\n");
path=mdlDisplayPath_new (elemRef,mdlModelRef_getActive());
printf("test3\n");
mdlDisplayPath_getInfoString(path,chaineW);
printf("test4\n");
Any idea?
I try to use the function with the path provide by
mdlLocate_setFunction(LOCATE_PROVIDE_PATH_DESCRIPTION, test);
Public void test
(
DisplayPathP path,
MSWChar* description,
MSWChar* refStr
)
{MSWChar chaineW[MAX_DISPLAYPATH_INFO_STRING ];
mdlDisplayPath_getInfoString(path,chaineW);
}
and i had the same problem
Regards
Seb