Tuesday, 15 January 2019 16:17

Adding New Types to Sparx EA

Written by
Rate this item
(0 votes)

If you are creating class or database models, you probably don't have a complete list of data types; "string" for example. This is how to add data types to your model in Sparx Enterprise Architect.


The code generation capabilities in Sparx Enterprise Architect (EA) are slick and very helpful if you get to that level of detail. The problem many people run into is that not all the datatypes are set for their language. Like nearly everything in EA, this is configurable.

Select Config - > Settings -> Code Engineering Datatypes... from the ribbon menu:


Then select your language (or add it if it doesn't exist):


Next, select "New" and fill in the name and optionally the length then press "Save".

Now the next time you add/update attributes and operations in your models, you have the option to select your new data types.

If the type does not appear, make sure the element on which you are working has its language set to the language you selected when adding the type. I usually use Java and the default language for all my models is set to Java.


Last modified on Wednesday, 13 February 2019 11:35
Steve Cote

Steve has been a systems architect for the telecommunications and electric utility industries creating circuit provisioning systems and smart grid solutions. He is a hands-on architect working with teams to deliver large complex projects. More recently, Steve has been consulting agile teams from Fortune 15 organizations, start-ups, and everything in-between to be more productive with DevOps and agile practices.

Leave a comment

Make sure you enter all the required information, indicated by an asterisk (*). HTML code is not allowed.