Table Of Contents

Graph IDESupport ► Bulk Convert

This section describes how to convert the Graphic View on a Document to a different representation such as a PNG file and then how to do so for many documents. This example uses a unix shell script and commands, however you may find other ways to do it as well.

First launch Graph IDE and turn on its Server. The server must be running for the conversion to work. If you are running the Mac App Store version of Graph IDE then it is sandboxed and you must first authorize access to the files to be converted. For example, you may wish to authorize your home folder. See the Server section for authorization instructions.

The conversion process utilizes the Command Line Tool called vvizard. So that tool (a small unix binary) must be installed. For discussion sake, this assumes it is installed at the location ~/Convert/vvizard.

Save the following shell script to a file called ~/Convert/convert_files.sh or the location you wish.

#!sh
###############################################################
# Run like:
# sh convert.sh MyDocument.vvibook
###############################################################

my_path=$PWD
my_file=`basename $1 .vvibook`

echo ${my_path}
echo ${my_file}

~/Convert/vvizard -s << EOF
add pvs_version 1
add image_output_type 1
add image_width 0
add image_height 0
add image_maker document
add file_path $PWD/${my_file}
save png ${my_file}.png
quit
EOF

The script above will convert the graphic view of one document to a png image file. Then, using the Terminal application, cd to the folder that you wish to convert all enclosing documents and type the following unix command.

find . -name "*.vvibook" -prune -execdir sh ~/Convert/convert_files.sh "{}" \;

The command above will find all Documents and convert those document's Graphic View to png (portable network graphics) image files with the same name as the document but with extension png. The vvizard CLI can also convert to other formats such as PDF.

All the figures in this manual are Graph IDE documents that have been converted using the above process as part of a larger deployment process.




© Copyright 1993-2019 by VVimaging, Inc. (VVI); All Rights Reserved. Please email support@vvi.com with any comments you have concerning this documentation. See Legal for trademark and legal information.