The CodeTemplate class represents your entire template as it's being processed by CodeSmith Generator . You can work with a CodeTemplate object to interact directly with the CodeSmith Generator engine. For example: