Book a Demo

Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Prev Next

Template Substitution Macros

Template substitution macros correspond to Base templates, and result in the execution of the named template. By convention, template macros are named according to Pascal casing.

     Structure: %<TemplateName>%

where <TemplateName> can be one of the templates listed in this topic.

When a template is referenced from within another template, it is generated with respect to the elements currently in scope. The specific template is selected based on the stereotypes of the elements in scope.

As noted previously, there is an implicit hierarchy among the various templates. Some care should be taken in order to preserve a sensible hierarchy of template references. For example, it does not make sense to use the %ClassInherits% macro within any of the attribute or operation templates. Conversely, the Operation and Attribute templates are designed for use within the ClassBody template.

Template substitution macros in the CTF

  • Attribute
  • AttributeDeclaration
  • AttributeDeclarationImpl
  • AttributeNotes
  • Class
  • ClassBase
  • ClassBody
  • ClassBodyImpl
  • ClassDeclaration
  • ClassDeclarationImpl
  • ClassImpl
  • ClassInherits
  • ClassInterface
  • ClassNotes
  • ClassParameter
  • File
  • FileImpl
  • ImportSection
  • ImportSectionImpl
  • InnerClass
  • InnerClassImpl
  • LinkedAttribute
  • LinkedAttributeDeclaration
  • LinkedAttributeNotes
  • LinkedClassBase
  • LinkedClassInterface
  • Namespace
  • NamespaceBody
  • NamespaceDeclaration
  • NamespaceImpl
  • Operation
  • OperationBody
  • OperationBodyImpl
  • OperationDeclaration
  • OperationDeclarationImpl
  • OperationImpl
  • OperationNotes
  • Parameter

Learn more