2

I've managed to learn enough about programmatically authoring visio diagrams to create shapes with custom properties which I can use to populate a diagram. I can connect the shapes with dynamic connectors and get visio to lay them out automatically.

As pleased as I am with my progress thus far, I am missing a fundamental piece to sucessfully model my system. I need to add shapes to shapes.

Initially when learning about the visio object model it seemed like since everything has a shapesheet, that it was a perfect match for my needs. However - attempts to 'Drop' a shape onto another shape keeps slapping me with com exceptions. (Even though the method is there.)

The solution should support shapes added to shapes which have shapes, etc, and the parent shape should grow to fit added children.

Internal nested shapes must remain eligible for gluing connectors to..

I'm trying to use grouping but don't feel like I'm getting any closer.

Any help or ideas are appreciated.

1
  • do you have api reference/documentation from where I can study how to create flow charts in C# using visio 2013 Commented Dec 17, 2017 at 9:40

1 Answer 1

1

If you are using Visio 2010 or later, Container shapes might serve your needs better than group shapes. Group shapes are primarily designed for creating composite shapes, not so much for containing peer shapes. Container shapes do not hide or limit the functionality of their contained shapes. Container shapes can be configured to automatically resize to fit the shapes added to them. You can create custom container shapes if the out-of-the-box containers don't have the appearance you want.

A link that might help you get started: http://blogs.msdn.com/b/visio/archive/2009/08/25/organizing-diagrams-with-containers.aspx

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.