# 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
- Compare Projects (in Astah Professional only)
- System Requirements

## [Exporting Image Files]

By using eimagef 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
cl | Class Diagram
uc | UseCase Diagram
ucd | UseCase Description
sc | Statemachine Diagram
act | Activity Diagram
seq | Sequence Diagram
com | Communication Diagram
cmp | Component Diagram
dep | Deployment Diagram
cs | Composite Structure Diagram
fc | Flowchart
dfd | Data Flow Diagram
er | ER Diagram
crud | CRUD
mm | Mind Map
rqd | Requirement Diagram
rqt | Requirement Table
tm | Traceability Map
ignore-ref | Ignore 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
jpg | JPEG
emf | Enhanced 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 youfd 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.