Revit 2026 API
IFCCategory |
Create copy of mapping template with new name.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.0.4.0 (26.0.4.0)
Syntax
public IFCCategoryTemplate CopyTemplate( Document document, string copyTemplateName )
Public Function CopyTemplate ( document As Document, copyTemplateName As String ) As IFCCategoryTemplate
public: IFCCategoryTemplate^ CopyTemplate( Document^ document, String^ copyTemplateName )
member CopyTemplate : document : Document * copyTemplateName : string -> IFCCategoryTemplate
Parameters
- document Document
- A Revit document to save the copied template.
- copyTemplateName String
- A name for copied template name.
Return Value
IFCCategoryTemplateThe copied mapping template element.
| Exception | Condition |
|---|---|
| ArgumentException | The name already exists. |
| ArgumentNullException | A non-optional argument was null |
| InvalidOperationException | Failed to create IFCCategoryTemplate element. |
The copied template is saved in the document passed as parameter.
Passing the same document as the source tampalte's document will create a new template in the same document.
The active template of the document remains unchanged.
See Also