# VP State Machine Code Generation Help

**URL:** <https://forums.visual-paradigm.com/t/vp-state-machine-code-generation-help/12675>\
**Category:** General Questions/Discussions\
**Created:** [July 9, 2015, 5:42am UTC](https://forums.visual-paradigm.com/t/vp-state-machine-code-generation-help/12675 "2015-07-09T05:42:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anonymous](https://avatars.discourse-cdn.com/v2/letter/a/8491ac/32.png) [@Anonymous](https://forums.visual-paradigm.com/u/Anonymous)\
**Post date:** [July 9, 2015, 11:17am UTC](https://forums.visual-paradigm.com/t/vp-state-machine-code-generation-help/12675/1 "2015-07-09T11:17:30Z")

</div>

Hello:

I am new to VP and at work we are interested at using it to generate UML State Machines and generate C++ code . I searched for tutorials on this but the ones I have found are somewhat basic. I was hoping to ask someone if they knew of some tutorials that went more in dept. Alternitevly we could use this post to write and share know-how on how to use this tool!

My main question is:I know how to make the UML diagram for documentation & design purposes, but what items should I keep in mind in order to use it suitable for code generation?

Thanks,

-Ed

---

<div class="post-metadata">

**Author:** ![Anonymous](https://avatars.discourse-cdn.com/v2/letter/a/8491ac/32.png) [@Anonymous](https://forums.visual-paradigm.com/u/Anonymous)\
**Post date:** [July 10, 2015, 1:59pm UTC](https://forums.visual-paradigm.com/t/vp-state-machine-code-generation-help/12675/2 "2015-07-10T13:59:00Z")

</div>

I tried to make a simple state machine and generate the code for it, but I keep getting the error

Expecting either a guard, push, pop or end state.  
A ‘{’ must proceed any action definitions.  
After the state name is given, then either an entry action, exit action or ‘{’ is expected.
