![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Subject: Generalized "link by attribute" Topic Summary: Need to link modules based on excel spreadsheet Created On: 11-Jul-2007 15:47 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
||||||||||||||||||||||
ffice Background I have an Excel spreadsheet containing many to many relationships between various documents. It has been decided that this mapping and related documents will be the basis for their traceability in DOORS, what I would like to do is use this mapping to create the linksets. The normal "link by attributes" would not help because it requires knowledge of the target object absolute number. An example of a mapping file could be:
Best solution I can think of: 1) Save the spreadsheet in CSV 2) Import CSV into a new "mapping" module 3) Have a DXL script that you can: Select source module name, attribute in source module, and source attribute in "mapping" module Select target module name, attribute in target module, and target attribute in "mapping" module Select Link Module 4) Run the script and all the links will be created from the source to target modules 5) Repeat steps 3 and 4 as needed Given the example above: If we wanted to map/link the "System Requirements" module to the "Software Architecture Document" module, the input screen would look like: Source Module: /Phase 1/Design/Software Architecture Document Source Attribute: Object Heading {attribute in "Software Architecture Document" module} Source Mapping Attribute: SAD section number {attribute in mapping module} Target Module: /Phase 1/Requirements/System Requirements Target Attributes: Requirement ID {attribute in "System Requirements" module} Target Mapping Attribute: Requirements number {attribute in mapping module} Link Module: /Phase1/links/Satisfies The result would create 3 links: - The object with Object Heading "2.4.3" in Software Architecture Document module to the object with Requirement ID "Req1" in System Requirements - The object with Object Heading "2.4.3" in Software Architecture Document module to the object with Requirement ID "Req2" in System Requirements - The object with Object Heading "2.4.4" in Software Architecture Document module to the object with Requirement ID "Req2" in System Requirements If anyone can think of an easier or better solution, please let me know |
||||||||||||||||||||||
![]() |
||||||||||||||||||||||
![]() |
||||||||||||||||||||||
Hi Franck,
I had a similar issue the past few days. I have imported my Excel spreadsheet and then written some dxl code to generate automatically the links between a list of Hazard causes that has an attribute that contains the abs numder of the hazard on another module.
I have pasted below the code.
Hopefully you can tune fairly easily it to fit your need...
Note: I didn't bother for now to find the hazard by an attribute different from the abs no. Should not be that difficult though...
Cheers,
Eric
+++++++++++++++++++++++++++++++
/*
* This module features the function "CreateLink" that generates automatically the links between the objects of 'FaultAnalyisModule' and 'HazardAnalysisModule'.
* The function search in 'HazardAnalysisModule' for the the object which absolute number is defined in the 'Cause To' attribute of 'FaultAnalyisModule'.
* If the object is found a link from the object of 'FaultAnalyisModule' to the object of 'HazardAnalysisModule' is create. If the object is not found an error
* message is displayed.
*
* NOTE: the name of the modules 'FaultAnalyisModule' and 'HazardAnalysisModule' is hard coded and defined in the constants below.
* The name of the link module that hosts the links from 'FaultAnalyisModule' to 'HazardAnalysisModule' in defined as a constant
* as well as the name of the attribute that contains the absolute numbers
*/
#include
![]() ![]() ![]() |
||||||||||||||||||||||
![]() |
||||||||||||||||||||||
![]() |
||||||||||||||||||||||
Well your source and target modules should each have "key" information that "links" the two together. If you don't, you might want to consider adding it in. The relationships shouldn't be external.
But yes your idea would work. It's a fairly easy script to write. Use #include <standard/miniExplorer/inc/miniExplorer.inc> for the selecting modules part(likely a button that pops up the mini explorer and stores the path of the selected module in a string). I just finished writing something at work extremely similar except I'm not creating links. ------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
||||||||||||||||||||||
![]() |
||||||||||||||||||||||
![]() |
||||||||||||||||||||||
I guess the script provided in this thread
here should do exactly what you want. Peter Edit: Modified the link according to the new forum layout Edited: 29-Nov-2007 at 09:01 by Peter Albert |
||||||||||||||||||||||
![]() |
Telelogic DOORS
» DXL Exchange
»
Subject: Generalized "link by attribute"
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.