Book a Demo

Author Topic: update image assets using the API  (Read 4379 times)

stevesavage

  • EA User
  • **
  • Posts: 119
  • Karma: +4/-0
    • View Profile
update image assets using the API
« on: June 02, 2017, 11:48:35 pm »
I've started making heavy use of the new Image Asset element to bring in mock-ups created by our development team so I can link them to BPMN activities.
E.g. while doing the activity the actor is interacting with the IT solution using the interface.

Because they are NOT using Sparx EA for the mockups (using Balsamiq), I'd like to:

  • Export screens from Balsamiq
  • Import them in to Sparx EA (and store in Sparx EA) using the file names as the Element Name
  • If they later update
  • Export screens from Balsamiq
  • Run a script in EA that replaces the images in Sparx with the new images, using the file/element names for matching

Does the API have a feature for this, or one planned for this?
I was hoping for something similar to the Element.LoadLinkedDocument(string Filename) function.
E.g. LoadLinkedImage(string Filename)

Steve.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: update image assets using the API
« Reply #1 on: June 03, 2017, 01:43:49 am »
You could directly update the table t_image. Just replace t_image.image with the binary data of the image and reload your diagrams. I haven't tested this, so try in a sandbox first.

q.