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.

SizeToString Method (String)

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: 2023.0.1
public string ToString(
	string separator


Type: SystemString
The separator characters(s).

Return Value

Type: String
A string that represents this instance using the specified separator character(s).
This example shows how to convert a Size instance into a string representation using a specific separator parameter. 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" by 10"1/2 but if set to FALSE it would display as: 431.8 by 266.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(" by ");
See Also
Was this helpful?
The feedback you give here is not visible to other users. We use your comments to improve the content.