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.

MaterialItemExport Method

Exports the material item in the material database to given file name. Materials are exported to *.lis format. If path is not given material is exported to model folder. If filename is empty material name is used as filename.

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


Type: SystemString
The export file name of the material item.

Return Value

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

public class Example
       public void Example1()
           MaterialItem item = new MaterialItem();

           if (item.Select("S235JR"))
               string filename = System.IO.Path.GetTempPath() + "\\" + "S235JR";
               if (item.Export(ref filename))
                   Console.WriteLine("S235JR material exported successfully");
See Also