![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
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 |
![]() |
![]()
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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. |
|
![]() |
|
![]() |
|
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.
|
|
![]() |
|
![]() |
|
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: |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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). |
|
![]() |
|
![]() |
|
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. |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.