[SOLVED]Generate source code from visio flowchart

Started by Makememaple, May 24, 2018, 11:25:58 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Makememaple

Hello guys!

So, I'm trying to create C# VSTO add-in that will generate source code(C++ for example) based on visio flowchart, do anyone have an example of something like this?

Tried googling it and found nothing.

Applications I saw capable of doing this (e.g. afce, flowgorithm) are always standalone and based on their own logics.

I've tried the easiest way: looping through shapes and print text based on name of shape(I have got a custom stencil with custom shapes' names), but it seems like "foreach(Visio.Shape shape in Shapes)" iterates through shapes based on their numbering in a document, like 1st/2nd etc. That's the problem when if..then comes to play, or I have "for" loop in another "for" loop etc.

Actually it would be greaat if you could help me with algorithm. Just your opinion of how you'd probably make it.

I'm sorry if there are any phrasing/grammar mistakes made.

RichRif1

I'm not sure if this will help but you might look at what was done here -> https://stama-statemachine.github.io/StaMa/html/ca217c97-dd3c-4c6c-a0e7-5893315663aa.htm

I realize it isn't a complete solution but it may get you started.

Makememaple

Hello, RichRif1!

Info you've provided me with helped a lot!
IMO the answer is to create a node tree with BFS and DFS used in certain situations.

Thank you for help and good luck!

RichRif1

Great, I'm glad I was aware of it so I could mention it you - the hard work was done by the young person who created it. Good luck!