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: Inlinks count
Topic Summary:
Created On: 5-Feb-2004 14:00
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.
Answer This question was answered by , on Friday, February 6, 2004 3:52 PM

Answer:
You could do something like:
 5-Feb-2004 14:00
User is offline View Users Profile Print this message


Bobbette Parker

Posts: 12
Joined: 22-Nov-2002

I am trying to find a script that would classify a requirement object as allocated based on it having one or more inlinks. However, if there are multiple links to an object, this should be counted just once and so will not overstate the total. Does anyone have such a code?

Bobbette
Report this to a Moderator Report this to a Moderator
 5-Feb-2004 16:38
User is offline View Users Profile Print this message


Pete Kowalski

Posts: 301
Joined: 7-Feb-2003

Here is some sample code. For every object in a module it will count the X amount of inlinks assoicated with the object and will print each object's Absolute Number value with the amount of links.



-------------------------
pete.kowalski(at)motorola.com
Report this to a Moderator Report this to a Moderator
 6-Feb-2004 14:02
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

When dealing with incoming links, always use LinkRef rather than Link. This way you get to see all the links, not just those coming from open modules.

The attached is some layout DXL that displays a count of incoming and outgoing links.


-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 6-Feb-2004 14:08
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

Or, you could create a new boolean DXL Attribute with the following code:

LinkRef lr

int numIn = 0

for lr in obj<-"*" do
{
numIn++
}

obj.attrDXLName = (numIn > 0)


-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 6-Feb-2004 15:21
User is offline View Users Profile Print this message


Bobbette Parker

Posts: 12
Joined: 22-Nov-2002

Thanks a lot. While these codes give me a count of all the incoming links within a given module, what I am trying to attain is that a requirement object is counted only once even if several objects are linked to that object. Thus the count of all incoming link or linkreference would overstate the total. How can I continue to the next object after counting the first link made to that object?

Bobbette
Report this to a Moderator Report this to a Moderator
 6-Feb-2004 15:53
User is offline View Users Profile Print this message


Bobbette Parker

Posts: 12
Joined: 22-Nov-2002

Thanks that's it.

Bobbette
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 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 1 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.