Placing UML classes in the appropriate folder when code is generated

Is there a way to indicate in a UML class which folder the class should be created in when it is generated in code? Also can the namespace be entered into the UML class and then be part of the generated code?

Hi user,

Thanks for your post. I noticed you asked this question in a ticket in our support ticket system and I have replied your message. I’ll answer one again so other users can benefit. :slight_smile:

For generate .NET code in SDE for Visual Studio (SDE-VS), you can generate code to folders if you use Instant Generator (Modeling > Instant Generator) - you need to check option “Create folders for namespace” (C# or VB.NET) / “Folder Structure Follow Package” (C++) in Advanced Options of Instant Generator.
But .NET round-trip engineering does not support generate code in folders following namspace - we will consider to support this in the future.

By the way, Instant Generator is supported in SDE/VP-UML Standard Edition while .NET round-trip engineering is supported in SDE Professional Edition for Visual Studio (SDE PE-VS).

You can specify the namespace to package header (see image below) when create a class diagram. Classes created under this diagram will be within specific namespace. The namespace of classes will be generated in code as well.

Best regards,
Lilian Wong

package_header.png