Edit a Template Module

Edit a Template Module

To edit a Template Module, access the Advanced Settings overview page and select the EDIT TEMPLATE MODULES tab.

The Manage Template Modules page is displayed:

Hover over a Template Module, the Context menu is displayed:

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

The Edit Template side panel window is opened:

You can edit the following information:

  1. Model Object Type: Template Model Object Type
    1. Update the Model Object Type for which the Template will be applied:
  2. Part per Model Object Type: Depending on the Model Object Type selected, the list of Model Object Type parts is available in a list
    1. Select the Part for which the Template will be applied as follows with the Link selected as Model Object Type:
  3. 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 1
  4. Model Objects list: the list of Model Objects of the Model Object Type selected is displayed
    1. Select the Model Objects for which the Template will be applied as follows with the Link selected as Model Object Type:
    2. A search box permits filtering the Model Objects list
  5. Editor: here, the Template code itself should be written in C# inside the method GetOutput(TargetObject targetObject, ArchitectureModel architectureModel, PackageConfiguration packageConfiguration)
    1. An IntelliSense editor (based on the Generator methods and classes) is available for example:
    2. Some snippets are available by typing bigenius:

      1. Select a snippet as iterator through terms, and the corresponding code is inserted:
  6. By clicking on the API Documentation link, you can open the API Documentation to help you develop the custom template
  7. By clicking on the Validate button, the Template code is compiled. The compilation errors/warnings are displayed below the code:
  8. By selecting the Preview tab, you can preview the generation result of the Template Module

 Further documentation will soon be available to help you write a Custom Template. 

Click on the SAVE button.

A notification confirms the correct update:

Demonstration video