cancel
Showing results for 
Search instead for 
Did you mean: 

subtype inheritance in powerdesigner

Former Member
0 Kudos

Is it possible to switch off the displayed inheritance of supertype attributes into subtypes entities? I don't need the supertype attributes displayed over and over in all the subtypes. I am using logical model Entity-Relationship notation.

(Erwin by default does not carry down supertype attributes into the subtypes so its easier to read the variant attributes in the subtypes).

Powerdesigner version 16.1.

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member438037
Participant
0 Kudos

Hi,

yes, it is. But since the display of inherited attributes in subtypes is a feature and not a bug, there is no single&easy switch to turn it off. Anyway, each entity attribute (even the inherited one) has a property called Displayed (you can find it in entity properties on the Attributes tab. If you don`t see it there, it will be necessary to display it first through "Customize Columns and Filter" button. Once you have it available, you can switch off any single attribute you wish to.

In case your model is quite large, you can use script like this:

For each ent in activemodel.entities
For each entAttr in ent.Attributes
If not (entAttr.InheritedFrom is Nothing) then
entAttr.Displayed = false
End if
Next
Next

to switch it off for all of them. You can very easily incorporate this small function into the context menu of your LDM and here you go. With small modification, you can call it repeatedly to switch it off and on again.

Regards,

Ondrej

GeorgeMcGeachie
Active Contributor
0 Kudos

Nice solution, Ondrej. You'll also need a method to display the inherited attributes, like this one:

Sub %Method%(obj)
' Implement your method on <obj> here
dim ent, entAttr
For each ent in activemodel.entities
For each entAttr in ent.Attributes
If not (entAttr.InheritedFrom is Nothing) then
entAttr.Displayed = true
End if
Next
Next
End Sub