Currently I’m extracting diagrams from standard HTML report.
Within that report there is a bunch of files with mappings between EA element eaGuids and EA website filepaths under:
EARoot/ js/data/guidmaps/ GuidMapXX.xml
, where XX are the first to signs of the eaGuid (following the start curly bracket. If you are scanning all the GuidMap files you don’t need to think about these two characters in the file name – but if you want to use it as a look-up, you can exploit that knowledge – I just scan all the files and create a hashmap data structure (currently)
Each file contain a set of mappings between eaGuids and their corresponding html pages
You’ll need to do some html-scraping on the html page to find the path to the diagram image.
--- as I said, this is the way I currently do it – I actually want to change this and instead use the API call PutDiagramImageToFile. Then I won’t have to run the EA HTML report at all. But there are som issues with that (see my post "PutDiagramImageToFile - varies on margins! What is is the algorithm?" from today:
http://sparxsystems.com/forums/smf/index.php/topic,37685.0.html ).