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.

ProfileConversion Class

The ProfileConversion class provides functionalities to convert profile strings from/to current units (set in "Units and decimals, Catalog, Profiles, Section Dimension" options).
Inheritance Hierarchy
SystemObject
  Tekla.Structures.DialogProfileConversion

Namespace:  Tekla.Structures.Dialog
Assembly:  Tekla.Structures.Dialog (in Tekla.Structures.Dialog.dll) Version: 2023.0.1
Syntax
public class ProfileConversion

The ProfileConversion type exposes the following members.

Constructors
  NameDescription
Public methodProfileConversion
Initializes a new instance of the ProfileConversion class
Top
Methods
  NameDescription
Public methodStatic memberConvertFromCurrentUnits
Converts a profile string from current units to internal units (set in Units and decimals options).
Public methodStatic memberConvertToCurrentUnits
Converts a profile string from internal units to current units (set in Units and decimals options).
Top
Examples
The next example assumes that the option "Units and decimals, Catalog, Profiles, Section Dimension" is set to "in".
using Tekla.Structures.Dialog;

class Example
{
    public Example()
    {
        string Profile = "PL10*10"; // Or "PL10\"*10\""
        string ConvertedProfile = string.Empty;

        ProfileConversion.ConvertFromCurrentUnits(Profile, ref ConvertedProfile);
        // ConvertedProfile will contain "PL254*254"

        Profile = "PL508*25.4";
        ProfileConversion.ConvertToCurrentUnits(Profile, ref ConvertedProfile);
        // The converted profile will contain "PL20\"*1\""
    }
}
See Also