To use python attribute editor templates, first create a python package named ‘AETemplates’. To do this:
- create a directory ‘AETemplates’
- inside, create an empty file ‘__init__.py’
- ensure that the directory above ‘AETemplates’ is on the PYTHONPATH
Python AETemplate sub-classes will be found and paired with node types if they match one of the three following conventions:
- there is a sub-module of AETemplates which contains a class with the same name, both of which match
the format AE<nodeType>Template ( ex. AETemplates.AElambertTemplate.AElambertTemplate )
- the AETemplates module contains an AETemplate subclass whose name matches the format AE<nodeType>Template ( ex. AETemplates.AElambertTemplate )
- the AETemplates module contains an AETemplate subclass which has its _nodeName class attribute set to the name of a valid node type.