![]() |
Telelogic DOORS (steve huntington) | ![]() |
Topic Title: How do I set access right of "Inherit from parent" for attribute in DXL script? Topic Summary: How do I set access right of "Inherit from parent" for attribute in DXL script? Created On: 7-Jul-2006 15:40 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
I'm trying to write a DXL script that sets the access rights of all attributes to "Inherit from parent". I don't see how to do this. For the actual requirements "inherited(o)" can be used but this does not work for attributes. Here is what I have so far:
AttrDef ad AccessRec ar string sAttrName for ad in (current Module) do { sAttrName = ad.name print sAttrName print "\n" for ar in ad do { // test whether object has specific access rights print "found ar for " print sAttrName print "\n" } } This simply printouts a line for each accessrec found per attribute. The atrributes that have inherit from parent set do not have any accessrecs found. Thanks for any help, John Morey |
|
![]() |
|
![]() |
|
DXL manual chapter 'Access controls' section 'Controlling access'. Look for "inheritedDef" or "inheritedVal". The first sets protection of the definition of the attribute (whether folks can modify the definition of the attribute (such as its name or whether it has a default value). The second sets the protections of the value (whether someone cal modify an objects value of that attribute).
In your case, use this: for ad in mod do { ErrMess = inheritiedVal(mod, ad) if (!null ErrMess) infoBox((ad.name) " Value inherited error: " ErrMess) ErrMess = inheritiedDef(mod, ad) if (!null ErrMess) infoBox((ad.name) " Definition error: " ErrMess) } |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.