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.

LibraryProfileItemCopy Method

Copy the library profile item in the profile database to item with new name.

Namespace:  Tekla.Structures.Catalogs
Assembly:  Tekla.Structures.Catalogs (in Tekla.Structures.Catalogs.dll) Version: 2023.0.1
Syntax
public bool Copy(
	string newName
)

Parameters

newName
Type: SystemString
The new name of the copied profile item.

Return Value

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

public class Example
{
       public void Example1()
       {
           LibraryProfileItem item = new LibraryProfileItem();

           if (item.Select("HEA100"))
           {
               string newName = "HEA100C";
               if (item.Copy(newName))
               {
                   LibraryProfileItem copy = new LibraryProfileItem();
                   if (copy.Select(newName))
                   {
                       Console.WriteLine("HEA100 copied successfully to HEA100C");
                   }
               }
           }
       }
}
See Also