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
Namespace: Tekla.Structures.Dialog
Assembly: Tekla.Structures.Dialog (in Tekla.Structures.Dialog.dll) Version: 2023.0.3
Syntax
The ProfileConversion type exposes the following members.
Constructors
Name | Description | |
---|---|---|
ProfileConversion | Initializes a new instance of the ProfileConversion class |
Methods
Name | Description | |
---|---|---|
ConvertFromCurrentUnits |
Converts a profile string from current units to internal units (set in
Units and decimals options).
| |
ConvertToCurrentUnits |
Converts a profile string from internal units to current units (set in
Units and decimals options).
|
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