A lot of UML drawing tools can create C++ or Java code.

Most of the programmers at my shop don't know the C++ language but do know the C language.

I'm looking for recommendations of UML tools that can generate C language code.

Platform: Windows 7 PC.
Compilers: IAR, Visual Studio, GNU GCC

  • 1
    Wow! I don't know if UML supports for C programming language. I mean you know UML is based on object-orinted paradigm. So, in other word, it's designed for high programming language like C++, Java, and C#. If such tool exists, what UML diagrams need to be supported?
    – meisyal
    Feb 1, 2017 at 18:22
  • Most likely, code should be generated for class diagrams. I don't know if code can be generated for ERDs, but that would be helpful. Feb 1, 2017 at 19:07
  • OK. Should it be paid or free software?
    – meisyal
    Feb 4, 2017 at 2:33
  • Doesn't make a difference; since it is for work, it can be either paid or freeware. The main goal is to get the developers to design software and then the bonus if the tool could generate some code from the design. Feb 4, 2017 at 17:41
  • 1
    We are using a Rhapsody plug-in for the Eclipse IDE to to generate C code from class diagrams (where, obviously, we don't have true classes, just a collection of data and functions to manipulate it)
    – Mawg
    Nov 30, 2017 at 12:26

1 Answer 1


I found the following softwares that support UML code generation for C programming language:

1. Eclipse

As you know, Eclipse is an IDE that mainly for Java programming language. Eclipse has a capability to support features from its plug-in. One of them is UML generator. Eclipse UML generator supports Java and C programming languages. It can either generate or reverse. For this context, this plug-in has C code generator called UML2C. It converts class and state diagrams.

2. Enterprise Architect

Enterprise Architect is a modeling software. This software can be treated as an IDE for modeling because it has complex features. Enterprise Architect supports C code generation from UML models. It supports not only class diagram but also state, sequence, and activity diagrams. This feature guide is available on this page.

3. Astah

Astah is also a modelling software. It has some different products. Astah can generate C source code from UML class models via a plug-in called UML2c. This plug-in just only supports class diagram.

Note that, all of softwares above are not free software, except Eclipse. Astah can be purchased free for student only. I recommend to check the pricing page.

I don't know either if a modeling software can generate source code from ERDs. ERD is a model that draws relationship between data and basically for database. If I am not mistaken, you want to generate SQL from ERDs.


Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.