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: Link Navigation
Topic Summary: Getting attribute values from linked objects
Created On: 9-Nov-2006 18:46
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 Al Lione, on Monday, November 13, 2006 8:49 PM

Answer:
If you're assigning a string/text attribute, you may want to add "" (double quotes) to the end of the assignment statement o."Job Number" = (source ll)."Job Number" "" or wait for Louie to logon and give the right answer :-)
 9-Nov-2006 18:46
User is offline View Users Profile Print this message


James Walker

Posts: 8
Joined: 15-Jun-2005

I have three modules with objects linked between them. The linkage is linear - meaning objects in module A are linked to objects in module B and objects in module B are linked to objects in module C but objects in module A are not linked to objects in module C. Is there a way to trace back from module C to module A and get the value of one of the attributes from that linked object in module A and set an attribute in the corresponding object in module C?
Report this to a Moderator Report this to a Moderator
 9-Nov-2006 19:28
User is offline View Users Profile Print this message


Al Lione

Posts: 59
Joined: 13-Jul-2004

Here is some code that works. It's pretty general and assumes that all 3 modules are open. It is setup to be run from module C. (traces inlinks through B to A). Hopefully it will be formatted properly when I click reply :-) Module m = current Object o, oo Link l, ll for o in m do { for l in o <- "*" do { oo = source l for ll in oo <- "*" do { o.Module_C_attribute = oo.Module_A_attribute } // end for ll in oo } // end for l in o } // end for o in m
Report this to a Moderator Report this to a Moderator
 9-Nov-2006 19:32
User is offline View Users Profile Print this message


Al Lione

Posts: 59
Joined: 13-Jul-2004

Ok well that didn't format, and I don't seem to have an option to attach a file. Also I mistyped a line, the assignment statement should read: o.Module_C_attribute = (source ll).Module_A_attribute
Report this to a Moderator Report this to a Moderator
 9-Nov-2006 21:01
User is offline View Users Profile Print this message


James Walker

Posts: 8
Joined: 15-Jun-2005

the line o."Job Number" = (source ll)."Job Number" returns the DXL error : -E- DXL: incorrect arguments for (=) Thanks for giving it a shot. I had all three modules open but I'm hoping to create a DXL column in "Module C" to contain the "copied" job number value. Will this be possible?
Report this to a Moderator Report this to a Moderator
 9-Nov-2006 21:07
User is offline View Users Profile Print this message


Al Lione

Posts: 59
Joined: 13-Jul-2004

Answer Answer
If you're assigning a string/text attribute, you may want to add "" (double quotes) to the end of the assignment statement o."Job Number" = (source ll)."Job Number" "" or wait for Louie to logon and give the right answer :-)
Report this to a Moderator Report this to a Moderator
 10-Nov-2006 08:40
User is offline View Users Profile Print this message


Paul Tiplady

Posts: 176
Joined: 28-Oct-2003

The advice I usually see for this kind of question is along the lines of 'use the traceability wizard, take a good look at the code it produces, and tweak it so it does what you really want'. Not that I've ever done it, but it seems sensible, and people don't tend to come back and say it didn't work...

But I like the idea of waiting for Louie's answer

Paul.

PS If you want to add code, use the 'Attach Code' button, and type it in that window. It preserves indentation etc (see below). Remember to click 'Attach Code to Message', not 'Close Window' before 'Reply to Topic'.

-------------------------


Paul dot Tiplady at TRW dot com
TRW Automotive

Edited: 10-Nov-2006 at 08:42 by Paul Tiplady
Report this to a Moderator Report this to a Moderator
 13-Nov-2006 20:50
User is offline View Users Profile Print this message


James Walker

Posts: 8
Joined: 15-Jun-2005

Al, I got it working. Thanks!!! Jim
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.