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: 2024.0.0+a110b435391768740483e3032720a566518c9a63
Syntax
public virtual bool Export(
	ref string filename
)

Parameters

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

Return Value

Type: Boolean
True on success.
Examples
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
Was this helpful?
The feedback you give here is not visible to other users. We use your comments to improve the content.
Previous
Next