![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
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 |
![]() |
![]()
|
![]() 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 :-) | |
![]() |
|
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?
|
|
![]() |
|
![]() |
|
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
|
|
![]() |
|
![]() |
|
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
|
|
![]() |
|
![]() |
|
the line o."Job Number" = (source ll)."Job Number" returns the DXL error :
-E- DXL:
|
|
![]() |
|
![]() |
|
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 :-)
|
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
Al,
I got it working. Thanks!!!
Jim
|
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Link Navigation
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.