Code Generation - Turn Your Diagram to Code

Transform UML to code. Our code generator allows you to convert your diagrams to source code in various programming languages. Mostly, you will need to build codes and scripts for UML class diagrams or entity-relationship diagrams. However, you can also generate code from a UML state machine diagram or any other diagram type with custom-defined templates.

UML Code Generator

Software Ideas Modeler allows you to generate code in various programming and scripting languages. UML code generator supports the following programming languages with the pre-defined generation templates:

  • Action Script
  • C++
  • C#
  • Delphi
  • Java
  • JavaSCript
  • PHP
  • Protocol Buffer
  • Python
  • Ruby
  • TypeScript
  • VB6
  • VB.NET
  • XSD
Diagram Editor with Code Generation Sidebar
Diagram Editor with Code Generation Sidebar

UML to Code

Software Ideas Modeler can generate code from UML diagrams. There are pre-defined templates that allow you to turn your UML Class Diagram with all the classes, interfaces, enumerations, and various relationships to source code in Java, C#, Python, C++, or other languages.

You can specify logical (UML) types for the attributes and operation and the generator will transform them into a correct type in the target language. If there is a need for language-specific types that cannot be resolved from the general logic types, you can use a type set for the specific language directly in the diagram - then the exact type will be used.

How to Generate Code for a Diagram?

There are two ways how to generate source code for a diagram - using the Generation sidebar or the Generation dialog.

The fastest way is to use the Generation sidebar. (It can be displayed from Ribbon/View tab/Window group/Sidebars drop-down/Generation). The sidebar allows you to generate code for the active diagram or only for the selected elements in the diagram editor. So you can easily generate code snippets and copy them from the code editor inside the sidebar.

How to Generate Code for Multiple Diagrams or Whole Project?

You can also generate the source code from UML using the Source Code Generation dialog. It is useful when you want to generate code for the whole project or more diagram at once. You can open it from the ribbon - Process tab / Generation group / Source Code button.

You can choose which diagrams you want to generate in the Source Code Generation dialog. The dialog supports searching in the project tree and offers the button for multiple node selection.

Source Code Generation Dialog
Working with Source Code Generation dialog

Unsupported Language or Diagram to Code Transformation

If you need to transform the diagram into code for a specific programming language or a framework in a defined language, you can do it. Software Ideas Modeler provides source code template language which allows you to define any template for any diagram type you want. You may even add a new programming language.


satty 25 November 2020 0:24:54

need software

Hope you doing.

Need to understand the software, what is the pricing for this.

Dusan Rodina - 25 November 2020 7:40:38

RE: need software


Thank you for your interest. You can find the current pricing here:

The feature comparison is available here:

For code generation, Premium edition is sufficient, which costs $109.

Justine Barroca 23 March 2021 13:11:12


class investment :

def __init__ (self, p, i, n):

self.p = p

self.i = i

self.n = n

def printname(self):

x = (self.p*((1+self.i))**self.n)

print (x)

p = int(input("Principal:"))

i = int(input("Interest_rate:"))

n = int(input("n:"))

z = investment (p,i,n)


New Comment