Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: vinzz38 on August 24, 2013, 12:54:16 am
-
Hello all,
is it possible to create a custom code template who generate 2 files like C++ (.hpp and .cpp)?
Thank you.
-
Yes, but you need to specify that an implementation file is required in an MDG technology.
See http://www.sparxsystems.com/enterprise_architect_user_guide/10/extending_uml_models/define_code_options.html
-
Ok thank for your reply.
I create a MDG Technology file with good code options:
- if I import the file by Settings> MDG Technologies ... > Advanced ... > Add Path, the code options work.
- if I import the file programmatically( ImportTechnology, C# method of Repository object in my Addin), the technology is loaded, but the code options don't work).
I need to import my technology file programmatically, is there a way to make the code options work ?
-
if I import the file programmatically( ImportTechnology, C# method of Repository object in my Addin), the technology is loaded, but the code options don't work).
ImportTechnology is the old way. To quote the help file: This applies to technologies imported into pre-7.0 versions of Enterprise Architect (imported technologies), not to technologies referenced in version 7.0 and later (referenced technologies).
Instead, you need to respond to the EA_OnInitializeTechnologies event.