API Reference

Detailed and full API reference helps you master Tekla development

This is the most recent version of Tekla Open API.
For older versions, please visit Tekla Warehouse.

ComponentItemExport Method

Exports the custom component item in *.uel-format to the to given file name. If path is not given custom component is exported to model folder. If filename is empty custom component name is used as filename.

Namespace:  Tekla.Structures.Catalogs
Assembly:  Tekla.Structures.Catalogs (in Tekla.Structures.Catalogs.dll) Version: 2019.0.0.0 (2019.0.0.0)
Syntax
public virtual bool Export(
	ref string filename
)

Parameters

filename
Type: SystemString
The export file name of the component item.

Return Value

Type: Boolean
True on success.
Examples
using System;
using Tekla.Structures.Catalogs;

public class Example
{
       public void Example1()
       {
           ComponentItem item = new ComponentItem();
           int version = 0;
           string componentName = "General_Tie";
           if (item.Select(componentName, -1))
           {
               string filename = System.IO.Path.GetTempPath() + "\\" + componentName;
               if (item.Export(ref filename))
               {
                   Console.WriteLine("Custom component exported successfully");
               }
           }
       }
}
See Also