How to delete TriForma Dependency Linkage

Hi All,

I got a file from my customer which they are using Bentley Building product to design. I want to edit the geometry but I can't because these geometries are attached a TriForma Dependency Linkage which prevent me to edit them.  I know TFREMOVE command in Bentley building product can do this but I haven't these products. So I want to remove these linkages by my program. I coded the following program but it can't do this.

MSElementDescrP edP = NULL;
mdlElmdscr_read (&edP, elemAddr[i], ACTIVEMODEL, FALSE, NULL);
if (SUCCESS == mdlDependency_getLinkage (NULL, 0, &edP->el, 48640, 0))
{
   int status2;
   mdlElement_memcpy (&el, &edP->el);
   status2 = mdlDependency_deleteLinkage (&el, 48640, 0); // returning 1 indicates success
   status2 = mdlElmdscr_replaceElement (&edP, &el);
   status2 = mdlElmdscr_rewrite (edP, NULL, elemAddr[i]);
}
mdlElmdscr_freeAll (&edP);
 I noticed that the Required app=1 in this Linkage. Does it mean I can't delete it without TriForma application loaded ?

Attached DGN is a test dgn which only includes on solid with TriForma dependency linkage.

Any help are appreicated !

Xue

SolidWithTFLinkage.dgn
Parents Reply Children