![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Guide me? How to Search and Link? Topic Summary: I want to Search for an object and then link to it. How? Created On: 18-Nov-2005 23:01 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
I need to link from current object (text="43") in module A, and I need to find the object in module B with "0043" in the tagNumber attribute.
It seems that it is a collection of relatively easy tasks, but I'm just a little too novice. First task is pretty easy. I'm comparing 43, or 130, or 5 to a four digit 0043, 0130, or 0005. I don't think DXL has the "format" commmand similar to VB, but I am pretty sure I can get this one figured out easily enough. This is where I need help. If I know the name of module B is "modB", what do I do to find "0043"? Does DXL have a good search function? Or should I loop through each object in modB til I find the one that has attribute tagNumber="0043? Last thing is to link the current object in modA with the object found in modB. Help!? Full code, or partial code, or some functions that I should be using? Do I need linkrefs, or links? Do I use modName_ or modRef or what? Thanks for any help! DougB |
|
![]() |
|
![]() |
|
Douglas,
There is a builtin function called Link by Attribute which can be found on the link menu. This function allows you to automatically craete links based on the value of a Text attribute. The script expects the text attribute to contain the absolute numbers of objects to be linked to, each separated by a newline. The code for this function is not encrypted and can be found in DOORSHOME/lib/dxl/standard/links/link.dxl. You have a number of choices: 1. change your tagNumber attribute so that it is of type Text and contains absolute numbers (without the zeroes padding) and use the builtin functionality. 2. copy and then modify the links.dxl to work with your tagNumber attribute. 3. create a DXL attribute that will take values from your tagNumber attribute and update a Text attribute that will work with the links.dxl. I assume that you are stuck with the tagNumber attribute, so option 3 would be my favourite. Code for the new DXL attribute is as follows: string s = obj."tagNumber" "" int i = intOf(s) obj.attrDXLName = i "\n" ------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Guide me? How to Search and Link?
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.