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: How to count the number of requirements
Topic Summary:
Created On: 22-Jul-2005 04:49
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 Greg Lacefield, on Monday, August 8, 2005 4:09 PM

Answer:
If you really want a count of requirements in the subsection, not simply all the objects in the subsection, then you must have an attribute or combination of criteria that indicates such. Then, you can include that with a filter for a subsection using the Object Number, e.g. to count the requirements in subsection 1.1.2, you could use:

(Object Number >= 1.1.2) AND (Object Number < 1.1.3) AND (Type == Reqmt)

where Type is a user-defined attribute.

The number of Accepted objects in the upper right corner of the filter dialog is your count.

Good luck to you,

Greg
 22-Jul-2005 04:49
User is offline View Users Profile Print this message


Deepak Mohan

Posts: 3
Joined: 22-Jul-2005

Hi,

How do I get the count for the number of requirements in a specific sub-section of the DOORS formal module?

Thanks.

Report this to a Moderator Report this to a Moderator
 22-Jul-2005 12:03
User is offline View Users Profile Print this message


Hazel Woodcock

Posts: 78
Joined: 6-May-2005

Filtering is the easiest answer.  If you just want an occasional count of a few objects then set up a boolean attribute called 'Filter' or similar and set it to not generate history, or affect change dates and change bars.  Set it to true just for the things you are interested in (this might be with another set of complex filters with include decendents or include ancestors set), then filter on your 'filter' attribute and the filter dialog will tell you how many objects are included.
If you want anything more permanant or complex, you probably need to play with dxl.

Hazel

Report this to a Moderator Report this to a Moderator
 22-Jul-2005 19:21
User is offline View Users Profile Print this message


cliff Bly

Posts: 58
Joined: 11-Apr-2003

Dxl is attached. It will give a count of this object and all children, grandchildren...... etc.



Note. Inserted as part of replay as attachments are not avail in this forum.

void countChildObj(Object oPrime,int &cntr) {
Object oChildPrime
for oChildPrime in oPrime do {
cntr++
countChildObj(oChildPrime,cntr)
}
}
//Main
Object o = current
int cntr = 1 // this object


countChildObj(o,cntr)
ack "There are " cntr " objects below this object -- count includes this object"

-------------------------
Cliff Bly
Report this to a Moderator Report this to a Moderator
 25-Jul-2005 14:39
User is offline View Users Profile Print this message


Ken Mcguffie

Posts: 63
Joined: 3-Feb-2004

There is also the Statistics in the Module Properties, Statistics tab.
Report this to a Moderator Report this to a Moderator
 26-Jul-2005 07:30
User is offline View Users Profile Print this message


Greg Lacefield

Posts: 13
Joined: 23-Oct-2003

Answer Answer
If you really want a count of requirements in the subsection, not simply all the objects in the subsection, then you must have an attribute or combination of criteria that indicates such. Then, you can include that with a filter for a subsection using the Object Number, e.g. to count the requirements in subsection 1.1.2, you could use:

(Object Number >= 1.1.2) AND (Object Number < 1.1.3) AND (Type == Reqmt)

where Type is a user-defined attribute.

The number of Accepted objects in the upper right corner of the filter dialog is your count.

Good luck to you,

Greg
Report this to a Moderator Report this to a Moderator
 26-Jul-2005 13:51
User is offline View Users Profile Print this message


Graham Joyce

Posts: 6
Joined: 5-Feb-2004

Hi,

If you adopt the rule that all requirements contain the word "shall", and that you only have one requirement per object, you can simply filter on object text containing the word "shall". It is good practice to write requirements in this way, so I think it's a good system to adopt - but then again, writing good requirements is another subject altogether.

I personally use "<shall>" just to ensure I don't pick up any words with .*shall.* in them, e.g. "shallow". You can also toggle the 'Match Case' check box in the Filtering window to suit.

Hope that helps,

Graham
Report this to a Moderator Report this to a Moderator
 26-Jul-2005 22:39
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Comparing paragraph numbers doesn't work all the time since comparisons are lexigraphic whereas you really want comparison's based on numerical values. You want section "2.12" to sort after "2.9" since 12 is bigger than 9, but it sorts before since 1 is smaller than 9.

Figuring out if an object is in a specific section requires an Object Handle of the section. Then keep looking at the Parent of the desired object until you get to the section (match) or a level 1 object (no match).

- Louie
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.