You can export diagrams as PNG/JPEG/EMF/SVG by using the command line in Astah. (EMF/SVG export is available in Astah Professional edition only.)
Exporting all the diagrams of C:\Astah_Sample.asta file into C:\Astah Diagrams as PNG.
Images will be exported in the specified folder (C:\Astah Diagrams in this example).
Each diagram will be stored under the packages which will be automatically created where the diagrams belong to accordingly. See the tree structure of this .asta file in the right figure, for example, an image of Activity Diagram will be exported under the [Activity] folder.
You can export all the diagrams at once or choose which diagram types you want to export by using the following options.
all: All of the diagrams
cl: Class Diagram
uc: UseCase Diagram…etc
png, jpg, emf or svg
Please refer to the Command Line Tool User Guide (CommandRunner.html file in the Astah Installation folder) for all the options.
– If you are using the free edition and would like to try out the EMF/SVG export, download free trial of Astah Professional.
4 thoughts on “Export diagrams to images using the command line”
Do you know how can I export the images using command line on mac?
Sure, the sample command is as below. (Exporting all the diagrams of Test.asta file in input folder into output folder as JPEG.)
astah-command.sh -image all -f ~/input/Test.asta -o ~/output -t jpg
You need JDK version 7 to execute.