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: Attribute inherited ... Need Help!
Topic Summary:
Created On: 19-May-2006 15:22
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.
 19-May-2006 15:22
User is offline View Users Profile Print this message


Rafal Klodzinski

Posts: 2
Joined: 19-May-2006

Hi,
Im writing a DXL and need to access the "Inherit" property of an Object.
Is that possible ?

To see this in doors, you have to lock an object, open the proprieties of the object,
select the "attributes" tab, select one of the attributes, and click on Edit...
There is an "Attribute Value" window poping up and the "Inherit" checkbox is right there.

Any idea how I can access it through DXL Code ??
I know there is a function called isAccessInherited() but I need something that would probably be called isAttributeInherited...

Any help would be really appreciated.

Edited: 19-May-2006 at 15:26 by Rafal Klodzinski
Report this to a Moderator Report this to a Moderator
 19-May-2006 17:26
User is offline View Users Profile Print this message


Shawn Stepper

Posts: 96
Joined: 6-Aug-2004

Look up AttrDef in the DXL manual. It has an "inherit" property. You can use "setInherit" to change the value.

You will need to do something like this:

AttrDef ad = find(current Module, "MyAttr")
ad = modify(ad, setInherit, false)


-------------------------
Shawn Stepper
shawn.e.stepper@wellsfargo.com
Report this to a Moderator Report this to a Moderator
 19-May-2006 17:46
User is offline View Users Profile Print this message


Rafal Klodzinski

Posts: 2
Joined: 19-May-2006

I have checked AttrDef before, but the problem is that it affects the "MyAttr" in the whole Module.
And I need to get the "inherit" property of a particular object
(ex: the object where Absolute Number = 165)

Ex:
I have 3 columns

ID - Main Column - Model

I need to get the "inherit" property of the Model with the ID = 165

Is this even feasable ?
Report this to a Moderator Report this to a Moderator
 19-May-2006 19:23
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

There are 6 types of Access Records in the module [1] Module [2] Object [3]Attr Defs [4] Attr Values [5] Attr Types [6] Views. I think you are confusing Object level access with Attribute Value access. BTW, in order to modify an object attribute you need access to both the object and the attribute value.

Anyway, these three DXL perms query and modify object level accesses: isAccessInherited(oCurr, IsInherit) <query>, inherited(oCurr) <sets access to inherited>, specific(oCurr) <sets access to specific

- Louie
Report this to a Moderator Report this to a Moderator
 30-Dec-2008 14:38
User is offline View Users Profile Print this message


Peter Albert

Posts: 232
Joined: 30-Dec-2005

Very late reply, but I was just searching myself for the answer to this very question. I found the solution in a different dusty corner of this forum and thought I post it here in case some else has a need for it:

AttrDef ad = find(current Module, "<put your attribute name here")
print hasSpecificValue((current Object), ad)

Regards,

Peter
Report this to a Moderator Report this to a Moderator
 5-Jan-2009 23:41
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Aaaahh. hasSpecificValue() will let you know if this obj-attr value is an actual value assigned, or if its been inherited or defaulted. That is, you can make an enumerated attribute with Yes/No/NA options, where NA is defaulted. If you look at an object-attr value and it says 'NA', you don't know if someone actually selected NA for that object, or if its been defaulted. hasSpecificValue will let you distinquish between them.

I see no mechanism in DXL to be able to distinquish between Inherited and Defaulted. That is, if you create an attribute that has a default value 'NA' but also is inherited, I don't think you can tell if a non-hasSpecificValue obj-attr value is defaulted to NA, or if its parent is explicitely NA, other than querying the parent's hasSpecificValue.

But back to the original question, I did some experimenting. I see that when an obj-attr value is currently either inherited or defaulted, (that is is appears to have a value but hasSpecificValue returns false), that the obj-attr GUI screen indeed has an 'Inherited' check box selected and the value box is greyed out. It looks like that even when the value is indeed Defaulted. In the GUI, you must uncheck that box before you can edit the value. Odd.

That check box is a feature of that GUI dialog and not a feature of the obj-attr value (that is, the person who wrote the obj-attr edit dialog box code came up with the check box, not the person who designed the underlying data). In DXL you can simply assign the obj-attr a non-null value (obj.NameAttr = "A") in which case it has that value and hasSpecificValue will return false; or you can assign that obj-attr a null value (obj.NameAttr = "") in which case the obj-attr value is subject to being [1] inherited (if AttrDef allows that and when the parent has a value), or [2] if it cannot inherit, then its defaulted (if AttrDef allows that).

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