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
  • xue.yulian said:
    I noticed that the Required app=1 in this Linkage. Does it mean I can't delete it without TriForma application loaded?

    The intention is to retain application-specific data so that a user may not inadvertently delete those data.  You can't modify an element that has Required App = 1 because the application-specific data may become out-of-sync with the geometric data.  But there are other flags in a dependency, such as Delete allowed without app., which Brien describes above.

    xue.yulian said:
    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 haven't these products

    That's exactly why you can't edit them.  By editing a TriForma construction with plain old MicroStation, there's a good chance that you may delete some non-graphic data that provide the TriForma intelligence.

     
    Regards, Jon Summers
    LA Solutions

Reply
  • xue.yulian said:
    I noticed that the Required app=1 in this Linkage. Does it mean I can't delete it without TriForma application loaded?

    The intention is to retain application-specific data so that a user may not inadvertently delete those data.  You can't modify an element that has Required App = 1 because the application-specific data may become out-of-sync with the geometric data.  But there are other flags in a dependency, such as Delete allowed without app., which Brien describes above.

    xue.yulian said:
    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 haven't these products

    That's exactly why you can't edit them.  By editing a TriForma construction with plain old MicroStation, there's a good chance that you may delete some non-graphic data that provide the TriForma intelligence.

     
    Regards, Jon Summers
    LA Solutions

Children
No Data