Embedding Images in Visio programatically via .net c#

Started by hs9211, April 11, 2014, 01:28:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

hs9211

Hello

I need to associate multiple images with existing shapes. The images are coming from external source.
Is there a way to import embedded images to an existing shape, so the images linked to a shape can be later retrieved.

I do not want to import images as shapes, but link a collection of images to an existing shape

I will be using .net c# to accomplish this task.

Thanks

JohnGoldsmith

If you're using Visio 2013 then you might be able to achieve this by opening the file package and swapping out existing media.  I looked at this (using a manual method) at the bottom of this post:

http://visualsignals.typepad.co.uk/vislog/2012/08/new-clippingpath-cell-in-visio-2013.html

Alternatively, Graham Wideman has a technique to use a group shape, where you put all of your Shape Data and other logic, and then just programmatically swap a child image shape.  This method allows you to retain any the original shape's size and position, connection points and data.  I guess the Shape Data could also contain the path to the original image file.

Best regards

John
John Goldsmith - Visio MVP
http://visualsignals.typepad.co.uk/