![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Ignoring links to deleted objects Topic Summary: Created On: 5-Dec-2006 14:25 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: Thanks - I was looking at isDeleted(), the help file doesn't show Object as one of the parameters, but of course I am using that way in the outer loop. Also my confusion is that (target link) seems to be the target module and also the target object, depending on how it is referenced. Anyway, I declared another Object, then added the attached lines to the inner loop and it now ignores the deleted target objects. | |
![]() |
|
I am writing a script to trace outlinks and compare the object text of the current object and the target object. I am getting stopped because some objects link to deleted objects in the target module. Notwithstanding the fact that this shouldn't be allowed, I need a way to skip these links so the script will work to completion. I am attaching my code and hopefully someone can steer me in the right direction. I am using a bunch of continue statements but I can't seem to get it to work. Thanks!
PS> using 7.1 |
|
![]() |
|
![]() |
|
In help file look at
Object target(Link l) Object source(Link l) and bool isDeleted(Object o) |
|
![]() |
|
![]() |
|
Thanks - I was looking at isDeleted(), the help file doesn't show Object as one of the parameters, but of course I am using that way in the outer loop. Also my confusion is that (target link) seems to be the target module and also the target object, depending on how it is referenced. Anyway, I declared another Object, then added the attached lines to the inner loop and it now ignores the deleted target objects.
|
|
![]() |
|
![]() |
|
Yes, DOORS generates an error when you try to delete an object with incoming links; but never-the-less there will be deleted objects with incoming links. That perhaps happens when the source module isn't open but I'm pretty sure it happens when the currrent user lacks "R" access to the source, and so doesn't know there's a link when deleting the target. Seems to me I can do it with DXL as well. So yes, check for deleted target objects.
The 'string target(Link)" and "string source(Link)" commands are worthless since they return the unqualified name of the module, not the full name. You need to first get the "modName_ (target(Link))" and then convert that to a full name, which is what you are doing with "if (null target link) continue". If the target module isn't open I don't you want your script to open it and THEN try to get a handle on the target object? Look through that library of mine you've got in "Lib-Links.inc", and find "fLoadOtherMods" and "fLoadAllOthers" functions that load other modules for you. IIRC those functions opened up modules faster than the documented way when considering each and every link. - Louie |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Ignoring links to deleted objects
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.