This document will explain how to use Astah API .
- Products covered in this document
- Astah SysML
About Astah API
Astah API is a Java Interface Group for developing applications software using Astah model data.
API can be used for developing plug-ins and also in the Script Editor to enable you access Astah models via Scripting language.
With Astah API, you can get, create, modify and delete models in the projects you create with Astah SysML.
- Redistribution of kinds of api.jar files, such as astah-api.jar, etc. is NOT allowed.
- By using Astah API, you are agreeing to be bound by the terms of END-USER LICENSE AGREEMENT.
In order to run applications created by using Astah System Safety API, you need to meet the requirements below:
- Astah System Safety is installed
- The Runtime Environment meets Astah’s System Requirements
- Set Classpath.
||Compile and Run|
- Multi-threading of Astah API is not supported. When using multiple threads, exclusive control should be performed on the application side.
- A part of the class structure of Astah API is different from the one of UML metamodel. Astah API has a simplified structure. Some abstract model elements in the UML metamodel inheritance structure are eliminated because they would not be instantiated as model elements.
- JAVA VM memory setting is required when handling a large size of Astah file
- Example for setting maximum heap size when memory error occurred: -Xmx2g
Try Script Editor
The easiest way to try out how API works is to use it in the Script Editor. You can run the script in Astah so that you can see how the API works or test your script easily.
Model and Presentation
Astah projects consist of Models and Presentations. Presentation is visual information to notate the model elements in Astah.
For example, if you want to get color information of a specific Class, you access the presentation. If you want to edit attributes of a specific Class, you access the model.
Just remember, you use presentations for anything visual.