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: Link Attributes - check exist and create
Topic Summary: check for and create link attributes
Created On: 2-Nov-2006 23:45
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.
Answer This question was answered by Scott Covington, on Monday, November 6, 2006 5:18 AM

Answer:
Pekka told me it was possible. Louie pointed me in the right direction. Here is what I came up with that seems to work fine. Some of what I did may not be needed since I didn't fine tune it. // Ensure proper attributes exist in the link module. // Create attributes if necessary. linkMod = module(l) current = linkMod ad = find (linkMod, "xyz") if (ad == null) { linkMod = edit(fullName linkMod, false) current = linkMod create object type "Integer" attribute "xyz" save (linkMod) }
 2-Nov-2006 23:45
User is offline View Users Profile Print this message


Scott Covington

Posts: 17
Joined: 29-Nov-2004

I have been unable to determine how to get my dxl (which uses a link attribute) to see if that attribute exists already and if it does not create the link attribute automatically.

So I am in need of two things:
1) How to tell if a link attribute exists through dxl
2) How to create a link attribute through dxl

Report this to a Moderator Report this to a Moderator
 3-Nov-2006 10:13
User is offline View Users Profile Print this message


Pekka Mäkinen

Posts: 276
Joined: 18-Mar-2004

1.) The link attributes are created in the link module, you have to open the link module and then you can use the exists function to check if the named attribute already exists in the link module
2.) The creation is the same as for formal modules, but you just create them in link module

-------------------------
Pekka.Makinen@softqa.fi
SoftQA Oy -http://www.softqa.fi/
Report this to a Moderator Report this to a Moderator
 3-Nov-2006 14:19
User is offline View Users Profile Print this message


Scott Covington

Posts: 17
Joined: 29-Nov-2004

Odd, I could swear I tried that and it didn't work.

I'll try again.  Maybe I missed something the first time.

This is a dxl running in a formal module that follows the links for information and uses some attributes on those links in the process.  So the link module is open, but the dxl is being run from a formal module.  Also, I'm presently in DOOORS 7.1-14 the majority of the time.  Maybe I need to try it in DOORS 8.1-02?

thanks,
Scott
Report this to a Moderator Report this to a Moderator
 3-Nov-2006 19:49
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

The exists function presumes the current module. You'll need to do something like this:
Module mFormal = current
Find the link module
Module mLink = read(NameLinkModule, false)
current = mLink
bool AttrExists = exists(NameAttr)
current = mFormal
Report this to a Moderator Report this to a Moderator
 6-Nov-2006 05:18
User is offline View Users Profile Print this message


Scott Covington

Posts: 17
Joined: 29-Nov-2004

Answer Answer
Pekka told me it was possible. Louie pointed me in the right direction. Here is what I came up with that seems to work fine. Some of what I did may not be needed since I didn't fine tune it. // Ensure proper attributes exist in the link module. // Create attributes if necessary. linkMod = module(l) current = linkMod ad = find (linkMod, "xyz") if (ad == null) { linkMod = edit(fullName linkMod, false) current = linkMod create object type "Integer" attribute "xyz" save (linkMod) }
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.