Author Topic: Visio2010 couples shapes together  (Read 5123 times)

0 Members and 1 Guest are viewing this topic.

CalumMcCall

  • Newbie
  • *
  • Posts: 2
Visio2010 couples shapes together
« on: April 16, 2014, 10:08:33 AM »
Hi,

I maintain a program which imports Visio diagrams via COM to use them for process simulation. This code was written before Visio 2010 was released and works fine with Visio 2007. The import code grabs all the objects in the diagram via COM, identifies those relevant to a simulation, such as Process and Decision objects, and creates suitable simulation objects to represent them. Other objects, such as the CFF container are turned into background images as they have titles etc.. which are useful. Starting with Visio 2010 however, the CFF container is no longer a blank box with a title, but rather it includes the image of the entire chart, including sub-objects such as swimlanes and process and decision objects. Unfortunately, these do not align with the objects above and it looks ugly. This also happens with the swimlanes, in that they seem to include an image of process objects.

I realise that the way CFF containers are handled changed in Visio 2010 from searching this forum. I assume that Visio has changed the way it stores the objects and thus my code likely needs to alter the COM request in some way. Can anybody advise me if I can 'ungroup' the CFF container so that it is simply a blank box? I'd also be interested to hear about the changes made in general. I tried searching both this forum and Google but I didn't find anything comprehensive. I've personally never used Visio before and have been handed this code so forgive me if I'm missing something obvious.

I asked about this problem on stackoverflow before I discovered this forum, I have attached images to my post there which might help clarify things:
http://stackoverflow.com/questions/23108849/difference-in-com-object-format-between-visio-2008-2010

Thanks in advance,

-Calum

Paul Herber

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3286
    • Paul Herber's website
Re: Visio2010 couples shapes together
« Reply #1 on: April 16, 2014, 10:23:44 AM »
I'd suggest first of all to open the Drawing Explorer window (on the Developer tab in Visio 2010) and look at the list of shapes on the page and compare to the same view in Visio 2007. I think your code will need to iterate through all the shapes on the page, but ignore CFF Containers, Separators and Swimlanes.
Electronic and Electrical engineering, business and software stencils and applications for Visio -

https://www.paulherber.co.uk/

CalumMcCall

  • Newbie
  • *
  • Posts: 2
Re: Visio2010 couples shapes together
« Reply #2 on: April 16, 2014, 10:38:58 AM »
Thanks for the quick response. I'll have a look in the Drawing Explorer Window. Do you reckon it's likely I won't be able to include CFF Containers and Swimlanes at all then? Ideally I'd like to keep these as the titles and names obviously add a lot of context to the diagram.