Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: Delete all links to specific module
Topic Summary:
Created On: 26-Jun-2007 23:22
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 26-Jun-2007 23:22
User is offline View Users Profile Print this message


Chris Jones

Posts: 177
Joined: 1-Jul-2005

I needed to get rid of all the links to a certain module, so I wrote a quick script. Didn't save it, and then thought, "Hey, that might be useful later." Sure enough, I found myself needing it again in a few minutes.

Hence, I figured I might as well rewrite it "right" and share. Enjoy!

-Chris
Report this to a Moderator Report this to a Moderator
 27-Jun-2007 22:42
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

This seems to delete all the links FROM the current module to an ambguously defined target module.

Well 'all' may be a stretch, you need to change the 'for o in m do' loop to 'for o in entire m do' loop; otherwise you only get links from displayed objects.

Your initial loop will find a target if that target is the last out linked partner of the current object. Doesn't seem to useful to me. If you really need to do it that way, then add a 'confirm' dialog to that first loop:
targ_name = ""
for lk in o -> "*" do
{ targ_name = fullName(target(lk))
if (confirm("Delete links to '" targ_name "'")) break
targ_name = ""
}
if (null targ_name) {infoBox("No target selected"); halt}

It may not matter, but you should 'flushDeletions' afterwards.

- Louie
Report this to a Moderator Report this to a Moderator
 27-Jun-2007 22:53
User is offline View Users Profile Print this message


Chris Jones

Posts: 177
Joined: 1-Jul-2005

Err, right, links from current to something else. Guess I could have been more clear on that .

The first loop was mostly to save me the effort of finding and then typing out the whole path of the module which I wanted to delete links to. I think it took me longer to type up the post than it would have to find that, of course.

Thanks for the feedback!
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 2 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 2 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.