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: 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
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.
 18-Nov-2005 23:01
User is offline View Users Profile Print this message


Douglas Birozy

Posts: 1
Joined: 5-Mar-2005

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
Report this to a Moderator Report this to a Moderator
 21-Nov-2005 09:01
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

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
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 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 1 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.