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.

Meta.Microsoft.Help.Id
M:Tekla.Structures.Drawing.Size.ToString

SizeToString Method

Returns a string that represents this instance (in fractional inches if advanced option XS_USE_ONLY_INCHES_IN_SHEET_SIZES set to true).

Namespace:  Tekla.Structures.Drawing
Assembly:  Tekla.Structures.Drawing (in Tekla.Structures.Drawing.dll) Version: 2020.0.0.0 (2020.0.55582.0)
Syntax
public override string ToString()

Return Value

Type: String
A string that represents this instance using default separator character "x".
Examples
This example shows how to convert a Size instance into a string representation. The result is affected by the value of the advanced option: XS_USE_ONLY_INCHES_IN_SHEET_SIZES. In order for this advanced option to work, set the advanced options XS_IMPERIAL and XS_IMPERIAL_INPUT to TRUE. If the advanced option XS_USE_ONLY_INCHES_IN_SHEET_SIZES is set to TRUE the result would display as: 17"x10"1/2 but if set to FALSE it would display as: 431.8x266.7
using Tekla.Structures.Drawing;

public class Example
{
       public void Example1()
       {
           // For this demonstration, we'll format 431.8x266.7 millimeters.
           Size size = new Size(431.8, 266.7);

           string formattedString = size.ToString();
       }
}
See Also