[V8i MDL] Strip Attributes

Hi,

I got a non expected behaviour in a mdl function.

 

The function should strip all database linkages from sub elements in a complex element.

Instead, the linkages for the first sub element are not stripped correctly.

 

Here is the snippet:

int intern_database_deleteSubLinkages_efunc(MSElementUnion *el, void *p,DgnModelRefP modelRef,MSElementDescr *e,MSElementDescr **pe) {

int length;

short attributes[MAX_ATTRIBSIZE];

length=0;

mdlElement_extractAttributes(&length,attributes,el);

if (length>0) {

mdlElmdscr_new(pe,NULL,el);

mdlElmdscr_stripAttributes(pe);

return MODIFY_STATUS_REPLACEDSCR;

}

return MODIFY_STATUS_NOCHANGE;

}

int do() {

mdlModify_elementDescr2(e,mdlModelRef_getActive(),MODIFY_REQUEST_NOHEADERS,intern_database_deleteSubLinkages_efunc,NULL,0);

}

 

Parents Reply Children
No Data