![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Inlinks count Topic Summary: Created On: 5-Feb-2004 14:00 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: You could do something like: | |
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
Thanks that's it.
Bobbette |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Inlinks count
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.