You'll need to use the API provided to save that image.
Is there a reason why you can't or don't want to use the API?
Unless of course you are saying that I can somehow ask the API to get the image from the cache rather then to re-generate it. That would really be the ideal case. :)That's exactly what I'm saying. The API to do that was added in the same version that added the capability to save the cache.
GetDiagramImageAndMap(string DiagramGUID, string Directory) | Boolean Notes : Saves the Image and Image-map for the Diagram with the specified GUID in the specified Directory location. The Image will be saved in PNG format and will have a name same as that of the Diagram GUID. The Image-map will be saved as a TXT file and will have a name same as that of the Diagram GUID. The option Auto Create Diagram Image Map must be enabled in the Model for this function to save the Image and Image-map. Parameters :
|
GetAllDiagramImageAndMap(string Directory) | Boolean Notes : Saves the Image and Image-map for all the Diagrams in the Model in the specified Directory location. The Image will be saved in PNG format and will have a name same as that of the Diagram GUID. The Image-map will be saved as a TXT file and will have a name same as that of the Diagram GUID. The option Auto Create Diagram Image Map must be enabled in the Model for this function to save the Image and Image-map. Parameters :
|
Gosh. That's now at least 10 years ago I asked for a new feature and it was already implemented.Microsoft are quicker! Only took them 9 years to implement a fix to one of my bugs.
q.
But at least we now have some reference data. It's like when I order from AliExpress or Banggood; I know it's going to take at least a month to get to me with free shipping.
It appears that the API functions added for this where misplaced as a result of versioning of the help. I've copied the signatures and descriptions below. I'll see to it that this is included in the help when it's next updated.