Book a Demo

Author Topic: Add background images to multiple diagrams  (Read 3340 times)

tomshanley

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Add background images to multiple diagrams
« on: January 13, 2012, 09:56:18 am »
Hi,

I have inherited a large project, with 100+ business processes which have been drawn in visio.  client wants these displayed within the HTML document I have generated from the sparx model.

as an interim measure (before I or someone else goes about re-modelling these processes as actual BPMN in sparx), i would like to import on mass the image files of each process and add it as an image on a blank process diagram.

I have created all the process elements, and added a blank BPMN diagram under each element with same name.  I was hoping the script could then add a boundary element to each diagram and set the alternative image to be jpg (of the same name as the business process, from a specified folder).  However, i can't see a way of doing this in the help files, forum or with my trial and errors.   i can't seem to -
a) add image files to the image manager and t_image
b) set the ObjectStyle for DiagramObject to be eg "DUID=9230D329;ImageID=861032603" for the image that has a name which has the same as the diagram

Has anyone does this sort of thing before with any success?

currently I'm only used vbscript, but happy to learn and use which technology works

cheers,
Tom

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Add background images to multiple diagrams
« Reply #1 on: January 13, 2012, 10:32:04 am »
The images are stored as blob in t_image. I use something like
Code: [Select]
       $sth->bind_param($param, MIME::Base64::decode($row->{$col}->{'content'}), DBI::SQL_BLOB);to get it in when reading an XMI export of image reference data.

q.