Topic
  • 7 replies
  • Latest Post - ‏2013-04-25T20:16:28Z by llandale
M@tze
M@tze
4 Posts

Pinned topic Remove dead links in modules

‏2013-04-25T09:06:54Z |

Hello,

I encountered a problem with dead links and have no idea how to solve this.

We have functional specifications modules and requirement specifiaction modules where objects are linked between these two modules. If I delete an object in a functional specification (because it was wrong or it is no longer needed for example) the incoming link in the requirement specifiaction module is still visible. If I try to navigate to the source, I get a error message like "object was deleted". How can I repair this dead link in the module or scan several modules for dead links like this?

 

Thank you in advance,

Matthias

 

  • kabr
    kabr
    115 Posts
    ACCEPTED ANSWER

    Re: Remove dead links in modules

    ‏2013-04-25T09:18:02Z  

    Purge the deleted objects and the inlinks will magically disappear.

     

    Karl

  • Wolfgang Uhr
    Wolfgang Uhr
    304 Posts
    ACCEPTED ANSWER

    Re: Remove dead links in modules

    ‏2013-04-25T09:23:49Z  

    Hi

    Dead Links are left if someone deletes the target of a link. The object may be soft-deleted or hard-deleted. In the first step you get an object which you can check by "isDeleted" and in the second something strange may happen.

    So put the following lines into each loop which iterates throug link targe objects:

    noError();

    myTargetObect = target(mySourceObject);

    if (lastError() != "") { continue }

    if (myTargetObect == null) { continue }

    if (isDeleted(myTargetObect)) { continue }

    So for every doors version and every form of object rests in your data, you have done your best.

    Best regars

    Wolfgang

  • kabr
    kabr
    115 Posts

    Re: Remove dead links in modules

    ‏2013-04-25T09:18:02Z  

    Purge the deleted objects and the inlinks will magically disappear.

     

    Karl

  • Wolfgang Uhr
    Wolfgang Uhr
    304 Posts

    Re: Remove dead links in modules

    ‏2013-04-25T09:23:49Z  

    Hi

    Dead Links are left if someone deletes the target of a link. The object may be soft-deleted or hard-deleted. In the first step you get an object which you can check by "isDeleted" and in the second something strange may happen.

    So put the following lines into each loop which iterates throug link targe objects:

    noError();

    myTargetObect = target(mySourceObject);

    if (lastError() != "") { continue }

    if (myTargetObect == null) { continue }

    if (isDeleted(myTargetObect)) { continue }

    So for every doors version and every form of object rests in your data, you have done your best.

    Best regars

    Wolfgang

  • M@tze
    M@tze
    4 Posts

    Re: Remove dead links in modules

    ‏2013-04-25T09:28:35Z  
    • kabr
    • ‏2013-04-25T09:18:02Z

    Purge the deleted objects and the inlinks will magically disappear.

     

    Karl

    OMG ... this was too simple ... ;)    *KnockMyHeadOnTheTable*

    Thank you Karl, for this fast answer!

     

    Matthias

  • Wolfgang Uhr
    Wolfgang Uhr
    304 Posts

    Re: Remove dead links in modules

    ‏2013-04-25T10:05:20Z  
    • M@tze
    • ‏2013-04-25T09:28:35Z

    OMG ... this was too simple ... ;)    *KnockMyHeadOnTheTable*

    Thank you Karl, for this fast answer!

     

    Matthias

    If the objecs are baselined you this may not work.

  • M@tze
    M@tze
    4 Posts

    Re: Remove dead links in modules

    ‏2013-04-25T11:57:46Z  

    If the objecs are baselined you this may not work.

    Belongs this answer to the DXL script which you posted below or the "Purge All" command from Karl?

  • M@tze
    M@tze
    4 Posts

    Re: Remove dead links in modules

    ‏2013-04-25T12:00:20Z  

    Hi

    Dead Links are left if someone deletes the target of a link. The object may be soft-deleted or hard-deleted. In the first step you get an object which you can check by "isDeleted" and in the second something strange may happen.

    So put the following lines into each loop which iterates throug link targe objects:

    noError();

    myTargetObect = target(mySourceObject);

    if (lastError() != "") { continue }

    if (myTargetObect == null) { continue }

    if (isDeleted(myTargetObect)) { continue }

    So for every doors version and every form of object rests in your data, you have done your best.

    Best regars

    Wolfgang

    Thank you too for the code.

     

    Kind regards,

    Matthias

  • llandale
    llandale
    3035 Posts

    Re: Remove dead links in modules

    ‏2013-04-25T20:16:28Z  

    Lets not talk about corrupted links.   You can see use the GUI Object Properties to tell you the other linked object.  You can then manually go there, undelete the object, delete the link, then re-delete the object.  You can also do that with DXL, get the source Object handle and ask if it isDeleted(oSource).

    You can also brouse for outgoing links for deleted Functional Objects.

    It is kind of a nuisance to be able to delete objects with Outgoing links as it puts a strain on those linked objects.

    -louie