Skip to content
  • There are no suggestions because the search field is empty.

Edit a Template Module

Edit a Template Module

To edit a Template Module, go to the Advanced Settings overview page and select Edit Template Modules from the left menu.

The Manage Template Modules page is displayed:

Hover over a Template Module to display the Context menu:

Click on the Context menu for a Template Module and select Edit:

The Edit Template side panel window is opened:

You can edit the following information:

  1. Template Type: Update the Template Type.
    1. You can choose to:
      • Add code before the template

      • Replace the template (default)

      • Add code after the related template


  2. Model Object Type: Template Model Object Type
    1. Update the Model Object Type for which the Template will be applied:
  3. Part per Model Object Type: Depending on the selected Model Object Type, the list of its parts is displayed.
    1. Select the Part for which the Template will be applied as follows, with Link selected as Model Object Type:



  4. Use for all future Model Objects: if you check the box, the Template will be automatically applied for all future Model Objects of the Type defined in Step 2
  5. Model Objects list: the list of Model Objects for the selected Model Object Type is displayed
    1. Select the Model Objects to which the Template will be applied, as shown in the example (with Link selected as the Model Object Type)
    2. A search box allows you to filter the list of Model Objects.
  6. Editor: The Template code should be written in C# within the method WriteOutput(TargetObject targetObject, ITemplateContext templateContext)
    1. An IntelliSense editor (based on the Generator methods and classes) is available, for example:
    2. Some code snippets are available by typing bigenius:
       
      1. Select a snippet, such as "iterator through terms", and the corresponding code will be inserted.
  7. Click the API Documentation link to open the documentation and access guidance for developing a custom template.
  8. Click the Validate button to compile the Template code. Any compilation errors or warnings will be displayed below the code.
  9. By selecting the PREVIEW tab, you can preview the generation result of the Template Module
  10. By selecting the ARCHITECTURE MODEL VIEW tab, you can display the Architecture Model for a Model Object in a Template Module 

 

 

 

 

 

 

 

Demonstration video