Description:
You can use the User Defined Property (UDP) macro functions to display UDP values in Models, Triggers, Stored Procedures, Script Templates and even in Forward Engineering Template (FET) files. What kind of macros are available for each Model object class that supports UDPs?
Solution:
The following table lists each object class that supports a macro with its corresponding macro:
Object Class |
Corresponding Macro
|
Entity |
%EntityProp(UDPName)
|
Table |
%TableProp(UDPName)
|
Attribute |
%AttProp(UDPName)
|
Column |
%ColProp(UDPName)
|
Key Group |
%KeyGroupProp(UDPName)
|
Index |
%IndexProp(UDPName)
|
Logical Relationship |
%RelLogProp(UDPName)
|
Physical Relationship |
%RelPhysProp(UDPName)
|
Subject Area |
%SubjectAreaProp(UDPName)
|
Model |
%DiagramProp(UDPName)
|
The UDPName macro argument is the UDP name that you define in the User Defined Properties editor. For example, to define the department, you can add an entity UDP called Department and assign 'Accounting' as a UDP property value associated with an entity. You can then use the %EntityProp(Department) macro to display the UDP Department value (Accounting) in the model. Macros can make models more descriptive according to your requirements.
Comments
1 comment
Hi Jun Lin !!
Please , Can you give me an exmaple for the macro functions?
It's a great article but I feel the needed of a example, for a better understanding.
Actually I work with ERwin 9.601.
Thank you a lot!
Alejandra
Please sign in to leave a comment.