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: Capturing attribute from a linked module
Topic Summary:
Created On: 3-Oct-2006 12:07
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 Tony Goodman, on Friday, October 5, 2007 7:52 AM

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.
 3-Oct-2006 12:07
User is offline View Users Profile Print this message


Alan Gooch

Posts: 107
Joined: 30-Aug-2005

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.
Report this to a Moderator Report this to a Moderator
 3-Oct-2006 13:25
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

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

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 4-Oct-2007 17:39
User is offline View Users Profile Print this message


Chris Annal

Posts: 36
Joined: 14-Dec-2005

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...
Report this to a Moderator Report this to a Moderator
 4-Oct-2007 20:03
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

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
Report this to a Moderator Report this to a Moderator
 4-Oct-2007 20:52
User is offline View Users Profile Print this message


Chris Annal

Posts: 36
Joined: 14-Dec-2005

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.
Report this to a Moderator Report this to a Moderator
 4-Oct-2007 21:00
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

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
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 2 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 2 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.