![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
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 |
![]() |
![]()
|
![]() 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) } | |
![]() |
|
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. |
|
![]() |
|
![]() |
|
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/ |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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)
}
|
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Link Attributes - check exist and create
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.