![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Capturing attribute from a linked module Topic Summary: Created On: 3-Oct-2006 12:07 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: For incoming links you need two loops, one using the LinkRef type, and then another using the Link type. The first loop gives you visibility of source modules, even if they are not open. You must open any source modules that are not open. Then the second loop allows you to process the inlinks. The best way to get an example of this is to use the trace wizard to create a trace column showing incoming links and use the DXL it produces as the starting point for your code. | |
![]() |
|
I have plenty of scripts where I display attributes from a linked module, and all work fine. I am now trying to display an attribute from a linked module two steps away.
I have Module A which has outlinks to Module B. Module B has inlinks from Module C. I wish to display an attribute from Module C in Module A. The script works okay, but only if Module C is open. I can't figure out why this is, as I'm opening all linked modules I have attached the DXL. Thanks in advance. |
|
![]() |
|
![]() |
|
For incoming links you need two loops, one using the LinkRef type, and then another using the Link type. The first loop gives you visibility of source modules, even if they are not open. You must open any source modules that are not open. Then the second loop allows you to process the inlinks.
The best way to get an example of this is to use the trace wizard to create a trace column showing incoming links and use the DXL it produces as the starting point for your code. ------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
|
![]() |
|
I tried to use the Analysis Wizard to first capture the DXL for incoming links in the module (Module B in the description above) that I intend as my target module for outlinks (from Module A in the description above). The inlinks in Module B are coming from another module (Module C in the description above). Everything displays well in my Module B, where I am capturing the following information, which in reality gives me the Test Phase of a requirement in Module C:
((parent)(parent)(parent)othero,"Object Heading", false) The problem I seem to be having is regarding the showOut(obj,1) and the showIn(obj,1) calls and where they should be placed. This has always been my downfall when trying to combine two scripts to do one larger and more important task. I'm attaching the script that passes the DXL checker test but still doesn't work. Hopefully you can detect my flaw... ![]() |
|
![]() |
|
![]() |
|
To Alan, give this a try.
It is untested. Replace certain things with the values you need. It did pass a quick DXL check though so there's no syntax errors. ------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com Edited: 4-Oct-2007 at 20:05 by David Pechacek |
|
![]() |
|
![]() |
|
Thanks a lot David. I did update it to make the variable names relevant for my modules, but I still don't get anything to display in my DXL column. I'll continue playing with it, but I'm attaching it here in case you might see anything unusual or overlooked on my part.
|
|
![]() |
|
![]() |
|
You could always try some debug "display" statements in there like after each linked to object is found. Try "printing" the object identifier of each found linked object as the script runs. That way you can verify that its working as intended.
One possible problem is that after loading those other modules, it doesn't know where to display it. But I don't know enough about the workings of DOORS to know if its possible for it to get lost like that in a layout DXL column. ------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Capturing attribute from a linked module
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.