Search code examples
enterprise-architect

How do I set the length of an attribute on a class diagram in EA?


I have a class diagram and have defined an element on this diagram, and created a custom code engineering datatypes type, which allows a fixed width field, for which I want to define a length.

I just can't see where to enter it. The attributes window shows Name, Type, Scope, Stereotype, Alias and Initial Value but doesn't seem to allow anywhere to set the length or precision values.

I want to be able to use this in the report template Att.Length.

I'm sure I've done this before in an earlier version but I can't find where to set this on EA 14.

I'm sure I'm missing something obvious, but I've looked in every properties window I can find.

Thanks for looking! :-)


Solution

  • Length is typically not used with code engineering datatypes, but with database datatypes.

    In that case this is intended to be used in database models, and EA will present a different GUI that enables you to edit the length of the datatype. enter image description here

    Technically these field are stored in t_attribute.Length in case of a type such as char, or t_attribute.Precision and t_attribute.Scale in case of a type such as numeric.

    There is no (easy) way to fill in these field for regular (non «column») attributes.