![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: copying attribute values between modules Topic Summary: Created On: 12-Feb-2003 14:03 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Hello,
I was wondering if there is a way to copy attribute values between modules so that I can use those values when linking by attribute. I have not had too much success so far. I do know that importing an attribute certainly does not copy the attribute values. Thanks, Mary |
|
![]() |
|
![]() |
|
Hi Mary,
One way to do this (not sure if there are more efficient ways) is to export the attribute values to spreadsheet from one module, then Import from spreadsheet to the other module. The problem is that you need something common between both modules to use as 'Key' data (such as the absolute number) so that doors can match up the attributes to objects on the re-import. This can be done using the standard Doors 'Export to Spreadsheet' option. Example: Export to .csv from Formal Module 1 : Absolute Number, Attribute value. Import to Formal Module from .csv : Absolute Number, Attribute value. (select Absolute Number as key during import). - Andrew. ------------------------- Andrew Tagg Astrium EADS Requirements Management Team Stevenage United Kingdom andrew.tagg@astrium.eads.net www.astrium.eads.net |
|
![]() |
|
![]() |
|
Are you asking: For a given current object, can I set the current value of attr "A" to the value one of my linked partners Attrs values "B"? That is, set the value of attr "OutAbsNo" to the AbsNo of a out-linked object?
Tagg's idea of using the "AbsNo" as the key is only valid when one of your modules was originally some sort of copy of the other; perhaps one is a "restored" version (at the subcontractor's DB) of the "archived" master (at the Prime's DB). Yes, you can do that but it requires a rather extensive DXL program to administer it. You've got to do such things as insuring you are using the correct link module, and handle the case when there are two outlinked objects. Once you match up the objects (which is the very hard part), the code is trivial: oCurr."A" = oOther."B"; possibly using richText commands if its a Text attr. - Louie |
|
![]() |
|
![]() |
|
Hello,
Okay. Thanks guys. I was afraid that I was going to get those answers. Looks like there is no really simple way to get around this. That is okay, though. Thanks, Mary |
|
![]() |
|
![]() |
|
Mary,
Are you wanting to copy the attribute value between modules that are "copies" (i.e. where the object ID is the same in both cases)? If so, the the following should work for you. This is a sniplet of code from a DXL that I wrote to do basically the same thing. Let me know if you ment something else (or something is confusing). Mark ------------------------- Mark Phillips mark.phillips@swri.org |
|
![]() |
|
![]() |
|
Mary -
Please expand your question in great detail. I may be able to help. It's very simple to copy attribute values between modules. The hard part is determining which values will go where in the second module (on what basis/criteria). rkilgore@northropgrumman.com |
|
![]() |
|
![]() |
|
Mark,
How do you modify your code if the modules are not exact copies, i.e. how do you copy an attribute from one module to another which both modules have a common Requirement ID attribute? Deniz |
|
![]() |
|
![]() |
|
<< Mark, How do you modify your code if the modules are not exact copies, i.e. how do you copy an attribute from one module to another which both modules have a common Requirement ID attribute? Deniz >> Deniz, The lines: nTarget = oTarget."Absolute Number" and nSource = oSource."Absolute Number" could just have been formed similar to nTarget = oTarget."Some Other Attribute" and nSource = oSource."Yet Another Attribute" (with nTarget and nSource defined appropriately). The comparison would still work, but the values of those attributes must be EXACTLY the same. Notice that you don't have to use the same attribute names in both modules. Some notes about this script:
Hope this helps, Mark ------------------------- Mark Phillips mark.phillips@swri.org |
|
![]() |
|
![]() |
|
Hi Mark,
One question, I was trying to understand the why the "continue" was used: if (!new) continue // don't process if you have already found a match Or was it rather a 'break'? ------------------------- Nandan Banodkar (nandanbanodkar@hotmail.com) |
|
![]() |
|
![]() |
|
Mark,
Thank you very much for the code you sent me for "copying attribute values between modules". Now, I have another question if you do not mind. I am trying to create a view which will display all of the columns in the current module and also all of the the attributes in the linked module to the current module. I know, I can display the linked attributes of the link module with the traceability analysis dxl code in the DOORS library. However, I need to display also the unlinked attributes of the link module. I could not find any library function in DOORS to do this. Can you help me with this? Thank you in advance Den |
|
![]() |
|
![]() |
|
<< Hi Mark, One question, I was trying to understand the why the "continue" was used: if (!new) continue // don't process if you have already found a match Or was it rather a 'break'? >> Nandan, I make no excuses... I am new to DXL programming and did not know about the break function. Thanks for pointing it out. Mark PS If anybody is wanting this function to copy to multiple objects, the contine/break line should be removed. PPS For unique matches (i.e. for the origional question), a Skip list can significantly reduce the total amount of time required to run this script. Search the DXL manual for "skip list example program" to see how it can be done. ------------------------- Mark Phillips mark.phillips@swri.org |
|
![]() |
|
![]() |
|
<< Mark, Thank you very much for the code you sent me for "copying attribute values between modules". Now, I have another question if you do not mind. I am trying to create a view which will display all of the columns in the current module and also all of the the attributes in the linked module to the current module. I know, I can display the linked attributes of the link module with the traceability analysis dxl code in the DOORS library. However, I need to display also the unlinked attributes of the link module. I could not find any library function in DOORS to do this. Can you help me with this? Thank you in advance Den >> Den, I am not sure that I understand your question. I think you are trying to access link attributes... which can be done through DXL. Here is an example script from the DXL class. Mark ------------------------- Mark Phillips mark.phillips@swri.org |
|
![]() |
|
![]() |
|
Mark,
In order to bring some clarification my question, let me give you an example. Say, I have two formal modules A an B. A 3rd link module, C links these formal modules. The A and B have the following attributes, A1, A2, A3, A4 and B1, B2, B3 and B4. A1 and A2 are linked to B1 and B2 respectively through the link module C. I want to create a view in A module, which will show A1, A2, B3 and B4 in four separate columns. I can show A1(B1), A2(B2) by using the trace library scrip, which came with DOORS. However, I need a script to include B3 and B4 non-linked attributes in two different column in a view of an A formal module. Do you have any suggestion? Den |
|
![]() |
|
![]() |
|
Mark,
I already figured out myself how to display those attributes B3, B4. I just added the link module location name in the following statement. for lr in obj <- "Link Module Location Name" Thank you Den |
|
![]() |
|
![]() |
|
I have a layout dxl script that for a given object in a source module (obj),
will display the value of an attribute of the linked object in the target module, and can also assign the value of the target attribute, back to the source module object. This was designed to work with single-valued or multi-valued enumerations. The original intention of the DXL was to reflect the assignment of a requirement (by functional group) from one module to another. It was intended to maintain assigned responsibility of a requirement across modules. Does this appear to be realted to what you are trying to accomplish? I would be happy to share this dxl code if it will help you. ------------------------- John Segelbacher |
|
![]() |
|
![]() |
|
John,
I appreciate if you upload the script to the forum of you can email it to my email address, denakkor@aol.com. Den |
|
![]() |
|
![]() |
|
My Target module is named Vragenlijst
My Source module is named Actual The absolute numbers are identical for the objects of which I want to copy the attribute content (text) The attribute name is Opmerking How do I get the code of Mark Philips running? Edit: Working code found. ![]() Edited: 14-Dec-2007 at 14:01 by Elbert Mol |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
copying attribute values between modules
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.