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: object(absno) function returns null if object is filtered
Topic Summary:
Created On: 24-Feb-2006 02:04
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.
 24-Feb-2006 02:04
User is offline View Users Profile Print this message


Kevin James

Posts: 32
Joined: 12-Dec-2005

I discovered today that the object(absno, [module]) function returns null if the object with the specific absolute number is currently hidden by a filter.  Has anyone else run into problems with this?

I didn't find any other function that would return the object regardless of filter status, short of looping through the entire module.  Didn't even find an undocumented DXL function, which was surprising.

Anyway, has anybody run into this before and found a workaround?  I'm running this from an attribute DXL, so don't want to forcibly turn off filtering in the module being searched.

Any ideas?

Thanks,
Kevin

Edited: 24-Feb-2006 at 02:05 by Kevin James
Report this to a Moderator Report this to a Moderator
 24-Feb-2006 12:29
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

The behavior is the 'as built' behavior.

Most of the functions in DOORS works with current display of objects. There are a few functions such as 'all' that is used to change the behavior.
Report this to a Moderator Report this to a Moderator
 24-Feb-2006 15:30
User is offline View Users Profile Print this message


David McMahon

Posts: 16
Joined: 15-Apr-2005

Another option is to use the for Object in entire module do..... I ' m not sure but I seem to remember that all objects (including unpurged deleted and filtered objects) are processed by using this loop methode.
Report this to a Moderator Report this to a Moderator
 24-Feb-2006 15:57
User is offline View Users Profile Print this message


Kevin James

Posts: 32
Joined: 12-Dec-2005

OK -- There's no way to apply the all/entire/etc modifications outside the context of a for...in loop, right?  I tried something along the lines of:

Module m = current;
Object obj = object(1234,entire m);
Object obj = object(1234,all m);
etc.

I just get DXL errors out of this.

Thanks,
Kevin

Report this to a Moderator Report this to a Moderator
 24-Feb-2006 16:02
User is offline View Users Profile Print this message


Kevin James

Posts: 32
Joined: 12-Dec-2005

David,

Thanks for your response.  Yeah, doing a "for Object in entire module do..." would do the trick.  This is running in the context of an attribute DXL, so I was hoping to avoid looping through the entire module "n" times just to track down objects.  I would think that the object(absno) function that DOORS provides would reference some kind of internal index, making it much faster than my just looping through the module.

Thanks,
Kevin
Report this to a Moderator Report this to a Moderator
 24-Feb-2006 20:37
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Yup, object(absno) only finds objects in the current display set. That drastically reduces its utility. Yup, for obj in entire mod do loop finds all the objects and you could put an absolute number test inside of it.

WARNING WARNING. Did you say that you've got attribute DXL that runs for one object but modifies the values of another object? Or did you say one such object of an Attr DXL gets the value of some other object? Or did you perhaps forget that variable "obj" is predefined and for Attr and Layout DXL it means "this object"?

We've got some huge long-running programs that we've speed up thusly: we've got a "Object fGetObject(int AbsNo)" function that finds the object regardless of its display state. It looks in a Skip list for the object. The Skip list is erased and then re-populated when either its not initialized or when its being used for a new module. The Re-poplulating function uses the for obj in entire mod loop using the AbsNo as the Key and Object handle as the data. I plan to expand this function to be able to handle the objects of two modules at the same time and thus drastically reduce the need to repopulate when the Main program bounces back and forth between modules. I'll play with the Skip list in a Skip list technique in order to make the function so hoplessly complicated they won't be able to fire me.

- Louie
Report this to a Moderator Report this to a Moderator
 3-Mar-2006 04:11
User is offline View Users Profile Print this message


Kevin James

Posts: 32
Joined: 12-Dec-2005

That's too bad.  I guess we'll have to take a similar approach by writing our own fGetObject(absno) type function.  I am writing an attribute DXL to retrieve the value of another object, not to modify another one (that would definitely be deserving of a warning).

Thanks for your feedback.

Kevin

Report this to a Moderator Report this to a Moderator
 3-Mar-2006 09:25
User is offline View Users Profile Print this message


Robert Swan

Posts: 86
Joined: 14-Apr-2005

A skip list, with appropriate for loop, allows me to trace object id's. (We have some documents that refer to the object id of requirements, and I then have to produce an attribute holding the target paragraph numbers to make it man readable.)
The trick is to remember to open the target module, AND set the view and filter as needed. Once the skip list is created you can close the module.
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.