1

I have found that VisioPS is able to draw diagram in xml from xml file using COM. Nice feature I can construct xml file and build diagram in visio. However for class diagram I need to add operations and attributes for classes. Is it possible to specify that information in xml file.

The link where information about visiops xml file is stored https://skydrive.live.com/?cid=1ff099edb1c7ebfa&id=1FF099EDB1C7EBFA%211421

Thanks in advance.

UPD

Link to the visio file with example: http://dl.dropbox.com/u/14767221/example.vsd

michael nesterenko
  • 13,240
  • 23
  • 104
  • 175

1 Answers1

0

@misha - Thanks! now that I see what you are trying to accomplish it is easier to answer. The short answer is that the code in VisioPS is optimized around using the "basic" stencils (simple rectangular and oval shapes) and not stencils as complex as the UML stencils. The UML shapes are complicated and much harder for me to automate. I do think it is possible, and so I will take a look at how this could be added in future versions.

saveenr
  • 7,249
  • 3
  • 17
  • 19
  • Is it possible to be done through com interop? I have met several question like mine, and answers are not so encouraging. The only plce that gives a hope is microsoft forum at: http://social.technet.microsoft.com/Forums/en-US/visiogeneral/thread/72ad591e-0914-40fb-b718-0ddc2125f250/ However I do not understand how I can access those properties from c# for example. – michael nesterenko Apr 18 '12 at 10:21
  • It should be possible, yes. COM Interop is exactly what VisioPS uses to control Visio. There was a similar question on creating StateCharts http://stackoverflow.com/questions/7592860/creating-statecharts-in-visio-using-c-sharp/7655311#7655311 that may be useful to look at. You can see from this example how hard it can be to use more complex stencils. – saveenr Apr 18 '12 at 17:18
  • Could you show an example how to access `Class` shape attributes and operations? – michael nesterenko Apr 18 '12 at 17:20