Change color of models based on its status/conditions

When you do the database design with Entity Relationship Diagrams (ERD) with Astah Professional, you may wish you could distinguish Entities (Tables) per database easily on the diagram. Since Astah currently does not handle multiple schemas per project, we are recommending these two ways.

(1) Change Entity colours based on Entity Type

[Tool] – [System Properties] – [Default ER Entity Type Color] can configure the color based on Entity Type base. (Up to 9 Types)



(2) Use a script to change Entity color based on its condition

Enter database information for each Entity in it’s definition field, then run the script to change Entity colors based on the information.

  1. Open ER Diagram and enter [a] in its definition field. In this sample, the left Entity has [a].
  2. Astah_ERD_1

  3. Download and install Script Plug-in
  4. Download script (Unzip after download)
    – If you are using Astah Professional version 6.9 or earlier, download this instead

  5. Go to [Tool] – [Script]. A [Script] window opens

  7. Go to [Script] – [Open] and select the .js file you downloaded

  9. Now go to [Action] – [Run] or click the arrow button in red circle.

  11. Now the ER Entity which has [a] in the definition field will change its color to blue
    astah、ER Diagram, Script, Plug-in

■ Customize this script to apply to other models

You can customize this script to apply to other diagrams and models by customizing the keywords and conditions.
Astah API
Astah Java Doc

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s