Tekla Open API

Detailed and full API reference helps you master Tekla Open API

This is the most recent version of Tekla Open API.
For older versions, please visit Tekla Warehouse.

FormBase Class

The FormBase class is the base class for all Tekla Structures dialogs. The class provides localization, unit conversion and data storage (temporary and file-based) among other things.
Inheritance Hierarchy

Namespace:  Tekla.Structures.Dialog
Assembly:  Tekla.Structures.Dialog (in Tekla.Structures.Dialog.dll) Version: 2019.0.0.0 (2019.0.0.0)
Syntax
public abstract class FormBase : Form

The FormBase type exposes the following members.

Constructors
  Name Description
Public method FormBase
The default constructor that does not need parameters. Initializes the form and registers property bindings.
Top
Properties
  Name Description
Public property Localization
The localization instance for the dialog. Each dialog has its own localization instance that has read the localization files needed for that dialog.
Top
Methods
  Name Description
Public method ApplyValues
Loads the dialog values from a file and performs Apply on the loaded values. To match the files to a certain dialog, the file suffix is set as the dialog type's name.
Public method GetConnectionStatus
Returns true if a proper connection to the Tekla Structures process has been established. Currently, there's no way to re-establish the connection.
Public methodStatic member GetUnitDecimals
Gets the number of decimals Tekla Structures uses with the specified unit type.
Public methodStatic member InitializeAngleUnitDecimals
Gets the number of decimals Tekla Structures uses for displaying the angle unit and initializes Angle class to use that.
Public methodStatic member InitializeDistanceUnitDecimals
Gets the number of decimals Tekla Structures uses for displaying the "length" unit and initializes the distance datatype to use that.
Public method InitializeForm
Prepares the data storage for the dialog and scans through the fields.
Public methodStatic member InitializeUnitDecimals
Gets the number of decimals Tekla Structures uses for displaying its units and initializes the Tekla.Structures.Datatype classes to use them.
Public method LoadValues
Loads the dialog values from a file. To match the files to a certain dialog, the file suffix is set as the dialog type's name.
Public method ModifyValues
Loads the dialog values from a file and performs Modify on the loaded values. To match the files to a certain dialog, the file suffix is set as the dialog type's name.
Public method SaveValues
Serializes the dialog values to an xml file.
Public methodCode example SetAttributeValue
Sets a value for the given control. When the dialog is not shown, setting a property directly for a control (such as textBox1.Text = "text") will not work for controls that have a Tekla Structures AttributeTypeName set. This method is going to have to be used to set the value.
Public method ShowForm
Displays the form.
Public method UpdateValues Obsolete.
Rereads and updates all the field values on the form.
Top
See Also