Create a Template Module
To create a new Template Module, access the Advanced Settings overview page and select the EDIT TEMPLATE MODULES tab.
The Manage Template Module page is displayed:
Click on the plus icon to create a Template Module:
The Create New Template side panel window is opened:
Fill in the following information:
- Model Object Type: Template Model Object Type
- Select the Model Object Type for which the Template will be applied:
- Select the Model Object Type for which the Template will be applied:
- Part per Model Object Type: Depending on the Model Object Type selected, the list of Model Object Type parts is available in a list
- Select the Part for which the Template will be applied as follows, with Hub selected as Model Object Type:
- Select the Part for which the Template will be applied as follows, with Hub selected as Model Object Type:
- 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
- Model Objects list: the list of Model Objects of the Model Object Type selected is displayed
- Select the Model Objects for which the Template will be applied as follows, with Hub selected as Model Object Type:
- A search box permits filtering the Model Objects list
- Select the Model Objects for which the Template will be applied as follows, with Hub selected as Model Object Type:
- Editor: here, the Template code itself should be written in C# inside the method GetOutput(TargetObject targetObject, ArchitectureModel architectureModel, PackageConfiguration packageConfiguration)
- An IntelliSense editor (based on the Generator methods and classes) is available for example:
- Some snippets are available by typing bigenius:
- Select a snippet as iterator through terms, and the corresponding code is inserted:
- Select a snippet as iterator through terms, and the corresponding code is inserted:
- An IntelliSense editor (based on the Generator methods and classes) is available for example:
- By clicking on the API Documentation link, you can open the API Documentation to help you develop the custom template
- By clicking on the Validate button, the Template code is compiled. The compilation errors/warnings are displayed below the code:
- By selecting the Preview tab, you can preview the generation result of the Template Module
Click on the SAVE button.
A notification confirms the correct creation:
Demonstration video