Code-gen inner Typedef class

14.1 SE

I have a problem with Typedef class for base class generated in one C++ file.

Class C in class A generates something like this:

#ifndef A_H
#define A_H

namespace nsTest {
 * a
class a

        int attribute;

        void b();

        #ifndef C_H
#define C_H

         * c
        class c


If class B has a Typedef stereotype, then the code-gen produces error: [Error] Fail to generate code.


Dear heleo,

Thanks for your inquiry. We are currently investigating the issue, and apologize for the trouble.

Dear heleo,

For the inner class problem. the issue was identified and fix will be available soon.
For Typedef problem, it caused by missing define type in typedef, the fix will generate type as “int” when undefined. Please follow these steps to define type for typedef:

  1. ensure programming language is C++ (under Window > Configuration > Configure Programming Language…)
  2. open specification dialog for b, select “Class Code Details”, define Type property.

Hi Heleo,

I would like to let you know the fail to generate code problem has been fixed. Please update the software to latest patch build (sp1_20170815be or later) to get the problem fixed. Details about update to latest patch can be found at

Please make sure you have pressed the “Update to latest patch” button on the left hand side of the dialog right after launching the update program

Please note that in you model you have the operation and typedef having the same name, and you will need to rename either one of it in order to have the code being generated.

Feel free to contact me if you require any further information.

Best regards,
Rain Wong