astah* Command Line Tool User Guide

March 22, 2012
Change Vision, Inc.


[Overview]

Command Line Tool which is included in astah* install folder enables you to export images and compare projects from Command Line.

[Exporting Image Files]

By using eimagef action with astah-commandw.exe (for Windows) or astah-command.sh (For Mac or Linux), you can export diagram images as PNG, JPEG or EMF. If you do not specify the image format, it exports in PNG format automatically.

When you perform by Mac, please install separately Java which satisfied system requirements.

[Windows] Export all the diagrams in the C:\input\hoge.asta.file to C:\output in PNG astah-commandw.exe -image er -f C:\input\hoge.asta -o C:\output

[Mac/Linux] Export all the diagrams in ~/input/hoge.asta file to ~/output in JPEG astah-command.sh -image all -f ~/input/hoge.asta -o ~/output -t jpg

Options
Option Description Type Note
-image Export Image Action all All Diagrams
clClass Diagram
ucUseCase Diagram
ucdUseCase Description
scStatemachine Diagram
actActivity Diagram
seqSequence Diagram
comCommunication Diagram
cmpComponent Diagram
depDeployment Diagram
csComposite Structure Diagram
fcFlowchart
dfdData Flow Diagram
erER Diagram
crudCRUD
mmMind Map
rqdRequirement Diagram
rqtRequirement Table
tmTraceability Map
ignore-refIgnore Referenced Diagrams
-dpi,--dpi [image dpi] Output Resolution - Specify an output resolution.
default=92 (System setting). Use 72 to export images with the same scale of a screen.
-f,--file [target file] Target File - -
-id,--dgm_id [ids for target diagrams] Target Diagram ID - Specify Diagram IDs with space-delimited format.
Export image files named by IDs with no directories.
-o,--output [output] Output Base Directory - Output directory : "Output Base Directory" + "project name".
-t,--type [image type] File Format png PNG
jpgJPEG
emfEnhanced Meta File


[Compare Projects]

You can compare two different files by using astah-commandw.exe for Windows, astah-command.sh for Mac/Linux from Command Line. Use -diff and give two .asta files that youfd like to compare.

[Windows] astah-commandw.exe -diff base.asta ref.asta

[Mac/Linux] astah-command.sh -diff base.asta ref.asta


[System Requirements]

Running this command line tool requires you to have an environment that runs astah*. If you use a large size of project, you may need to adjust the JavaVM memory option.

[Windows] Edit astah-commandw.l4j.ini [Initial Heap size]
-Xms16m
This means the initial heap size is 16Mbytes, so change the 16.

[Maximum Heap size]
-Xmx384m
This means the maximum heap size is 384Mbytes. So change the 384.

[Mac/Linux] Edit astah-command.sh [Initial Heap size]
INITIAL_HEAP_SIZE=64m
This means the initial heap size is 64Mbytes, so change the 64.

[Maximum Heap size]
MAXIMUM_HEAP_SIZE=1024m
This means the maximum heap size is 1024Mbytes. So change the 1024.