![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Link Attributes Topic Summary: Reading the Target Object ID for a linked object. Created On: 28-Sep-2004 09:59 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: When you open a module, the link modules it "uses" are opened automatically, giving you access to the link objects. You can get a handle on links using a loop and then get the source and target object absolute numbers as follows, without opening the other modules. Link l Object o = current for l in o->"*" do { print "Source = " sourceAbsNo(l) "\n" print "Target = " targetAbsNo(l) "\n" } Note that the DXL manual entries for sourceAbsNo() and targetAbsNo() functions are wrong. | |
![]() |
|
If I have an open module and am looking at an object which has a
link, a right click on the link will tell me the Name of the linked module and, the Object text (if the target module is open) or the Object ID (if the target module is not open). If I 'look at' the same information using a DXL script, the Object handle is returned as NULL if the module is closed. This means that the Object ID is not available :-( The comment in the DXL manual is that if I have a link to a module which isn't open, I will need to open the module it if I want any information other than the module name. When I use this solution (and open the target module) and then use the "Absolute Number" attribute to find out the same information - it takes nearly 15 seconds. I know that this is because I am opening the target module and it is a big module but even so !! Does anyone know of a way to interrogate a link, to find out what the target object number is without opening the target module as well? Thanks (in advance) Mark ![]() ------------------------- I used to have an open mind ... but my brains kept falling out! |
|
![]() |
|
![]() |
|
Don't know any way. But be sure to open the target module invisible; use "false" instead of "true":
mod = read(NameTarget, false). Invisible modules don't take anywhere near as long to load. Only open modules visible if you intend the user to see them. - Louie |
|
![]() |
|
![]() |
|
Done that - I'd guessed that not displaying might speed things up but it's still far too slow. The thing that's puzzling me is that Doors can do it in normal operation mode (without having to open the target module) - so how is it done?
Mark ------------------------- I used to have an open mind ... but my brains kept falling out! |
|
![]() |
|
![]() |
|
You can use the function:
int targetAbsNo(Link l) to get the Absolute Number of the target of a link, without opening the modue. |
|
![]() |
|
![]() |
|
When you open a module, the link modules it "uses" are opened automatically, giving you access to the link objects.
You can get a handle on links using a loop and then get the source and target object absolute numbers as follows, without opening the other modules. Link l Object o = current for l in o->"*" do { print "Source = " sourceAbsNo(l) "\n" print "Target = " targetAbsNo(l) "\n" } Note that the DXL manual entries for sourceAbsNo() and targetAbsNo() functions are wrong. ------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
|
![]() |
|
Don't know how DOORS knows. I poked around with the "link attributes" and noticed the standard ones apply to the link-sets and the Created By and Modified By ones also apply to links; but the Source and Destination ones are for the linkset only. Didn't find one that means "This Link's target object".
- Louie |
|
![]() |
|
![]() |
|
Antonio and Tony,
Thanks for the suggestion - it worked !! I didn't try AbsNo because the DXL manual implied it would return a value for the module rather than a value for an object within a module ... targetAbsNo Declaration int targetAbsNo(Link l) Operation Returns the absolute number of the module that is the target of l. Mark ------------------------- I used to have an open mind ... but my brains kept falling out! |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Link Attributes
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.