![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Deletion of outlinks via a script Topic Summary: Created On: 27-Nov-2007 15:27 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
I currently have a DXL script that deletes outlinks from an object if one of its attributes meets a specific criterion. For some odd reason, the script skips the deletion of some of the outlinks but not all of them. I tried adding a "canDelete" function check for each of the outlinks. The outlinks seem to pass this check but still do not get deleted. I have a flushDeletions() function call at the end of my script. Yet, the problem still persists. I was wondering if any of you have run into a similar issue. If so, any ideas as to how I may circumvent this problem would be very helpful. Any input would be of help. Thank you in advance.
Regards, Pranav |
|
![]() |
|
![]() |
|
I am guessing that you are deleting the links within the "for link in object" loop.
Although the links are not actually deleted until you call flushDeletions(), I think that behaviour is unreliable. Store the links in a skip list, then loop through the skip list and delete them. Then flushDeletions. ------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
|
![]() |
|
Hi Tony,
Thank you very much for your prompt response. I will try storing the links in a skip list and then deleting them. Thank you once again. Regards, Pranav |
|
![]() |
|
![]() |
|
I'm with Tony. Some others have argued, however, that if you flushDeletions after the for link loop, then you don't need to stage the links in a Skip list. However, I routinely stage stuff like Links and Baselines and others in Skip lists.
If you flushDeletions() while INSIDE the link loop, then it will possibly mess up the loop. However, I suspect that since you can 'canDelete(lnk)' that that's not your problem. I wonder what canDelete(lnk) will do when you have edit access to the object but not to the link module; or what will happen if you cannot even Read the target object. In any case, you can trap delete link errors like this: noError() delete(lnk) string ErrMess = lastError() if (!null ErrMess) infoBox("Error Deleting Link:\n" ErrMess) |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Deletion of outlinks via a script
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.