Subfeature removing (MDL, XFM)

Hi,

I have diffulty trying to remove subfeature from feature.

This is a piece of my code:

// suppose that I have correct 'feature' and 'subfeature' handles

StatusInt status;

status = xfmFeature_removeSubFeature(feature, subfeature); 

if(status == SUCCESS) {

  status = xfmFeature_write(feature, FALSE);

  if(status != SUCCESS)

     printf("Can't write feature!\n");

}

else

  printf("Can't remove subfeature!\n");

xfmFeature_free(&subfeature);

xfmFeature_free(&feature);


After that my own tools and Element Info window show that feature has no subfeatures (Sub-Feature Count is 0).

But after reopening DGN or compressing design my feature owns subfeature again.

I don't know what to do to remove it :(

I have to mention that this is subfeature without geometry. I use it to group features and add some relations between them.

Myzzard