Go to [Tools] – [Script Editor] or [Script] from main menu to open a script editor.
Write script in upper window or go to [Script] – [Open] and select the .js files. (Sample Scripts)
Click the arrow button or go to [Action] – [Run] to run the script.
The result appears in the bottom window.
You can save your scripts from [Script] – [Save as].
You can find script samples on Sample Scripts page.
Also, if you download the plug-in files from the [Download] button at the top of this page, you will get the following sample .js files.
Add Setter/Getter to target Attributes
Add stereotype to target models
Show the version of currently-used Astah
Show a number of Classes that are included in the currently-open project
Create a new Class diagram
Create new ER entities with specific logical names and physical namess
Export model information to CSV format file
List up all the Class names in the currently-open diagram
List up all the Index information of all the ER models
List up all the topics in currently-open Mind Map
List up all the package and class names
List up all the property information of target model element
Search a class by keyword and add a specific color and note to it
List up all the Messages without operations in Sequence diagrams
Open a dialog to enable you to use Java GUI
Sample scripts may not work on old version of Astah. If you are using Astah Pro 6.9 or earlier, use the sample scripts in the [sample scripts] – [java7] folder. Also some somple scripts do not work with Astah Community because it does not provide support edit API.
Available predefined variables in the script
projectAccessor object in Astah API. null means there is no project file in Astah.