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: Modifying enumerated attributes, project-wide
Topic Summary:
Created On: 12-Sep-2002 21:56
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.
 16-Sep-2002 15:49
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

You CAN insert new enumerated values into an in-use enumerated type. My feeble efforts at doing this with DXL failed but you can do it manually. Deleting available values may get tricky or may not be allowed.

- Louie
Report this to a Moderator Report this to a Moderator
 30-Sep-2002 12:26
User is offline View Users Profile Print this message


Judith Underwood

Posts: 35
Joined: 25-Sep-2002

You can do it in DXL if, as Louie says, all you want to do is add items. However it's a bit tricky -- it appears the manual is incomplete and there may be a bug as well.

I'm attaching a little example which works for me.

Judith
Report this to a Moderator Report this to a Moderator
 7-Nov-2002 19:49
User is offline View Users Profile Print this message


Robert Perkins

Posts: 8
Joined: 1-Oct-2002

// This script changes the inheritance of all attributes that end with _Compliance or _ComplianceText for
// all modules in the top-level folder of a project.
// For setting up a change to enumerations, I would look at the .dxl online manual for the syntax; I remember
// that there was a code example showing how to add to an enumeration.
// Rob rperkins@caspiannetworks.com

string AdNameStr
string AdNameStrRt
string AdNameStrLt
int i
AttrDef ad
string modName
Module m_target

for modName in current Project do {
m_target =edit (modName, true)
print (modName "\n")

for ad in m_target do {
//print "Attribute: " ad.name "\n"
if (ad.name == ("ASIC_Compiance")) {
string NewName
NewName = ("ASIC_Compliance")
ad = modify(ad, setName, NewName)
}


/*Skip nrinprefix = create
put(nrinprefix, 1,1)
put(nrinprefix, 2,2)
put(nrinprefix, 3,3)
put(nrinprefix, 4,4)

//Permission all = read|create|modify|delete|control

// There are 1 to 5 characters in front of the _Compliance or _Compliance text, so gotta check for all of these

for each i in nrinprefix do {
*/
for i in 0:5 do {
AdNameStr= ad.name
AdNameStrRt= AdNameStr[i:]
//print AdNameStr"\n"
if (AdNameStrRt == ("_Compliance")) {
ad = modify(ad, setInherit, false)
print ("Modified " AdNameStr "\n")
}

AdNameStr= ad.name
AdNameStrRt= AdNameStr[i:]
//print AdNameStr "\n"
if (AdNameStrRt == ("_ComplianceText")) {
ad = modify(ad, setInherit, false)
}

AdNameStr= ad.name
AdNameStrRt= AdNameStr[i:]
//print AdNameStr"\n"
if (AdNameStrRt == ("_Delivery")) {
ad = modify(ad, setInherit, false)
print ("Modified " AdNameStr "\n")
}

/* These functions set access control to be inherited rather than specific.
The inheritedVal function does it for the attribute value of the attribute definition ad in module m.


string inherited{Def|Val}(Module m,
AttrDef ad)

*/

} //1 to 4

} //ad in module
save(m_target)
close(m_target)
}//modules in proj
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.