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.

Tekla.Structures.Plugins Namespace

The Tekla.Structures.Plugins namespace includes all the functionality to create a plug-in into Tekla Structures. Please see the Plug-in Guide to get started with developing plug-ins.
Classes
  Class Description
Public class AutoDirectionTypeAttribute
The AutoDirectionTypeAttribute class is used for storing the auto direction type. Based on the type the system will then calculate the up direction of the connection/detail if the "Auto" up direction is chosen in the dialog. The attribute is initialized from the custom attribute [AutoDirectionType(AutoDirectionTypeEnum.AUTODIR_DETAIL)] in the connection/detail source.
Public classCode example ConnectionBase
The ConnectionBase class is a base class for defining connections, details and seams. These types are more specialized and restricted by the input values than the ones derived from PluginBase.

The coordinate system for connections, details and seams is explained in the Tekla Structures help, in the part about the position type of custom components. The position type defines the origin of the custom component, relative to the main part.

Public classCode example CustomPartBase
The CustomPartBase class is a base class for defining custom parts. These types are more specialized and restricted by the input values than the ones derived from PluginBase.

The coordinate system for connections, details and seams is explained in the Tekla Structures help, in the part about the position type of custom components. The position type defines the origin of the custom component, relative to the main part.

Public class CustomPartInputTypeAttribute
The CustomPartInputTypeAttribute class is used for defining the input type. Based on the type the system will then ask for the correct number of input points in the creation. The attribute is initialized from the custom attribute [CustomPartInputType(CustomPartBase.CustomPartInputType.INPUT_1_POINT)] in the custom part source code.
Public class CustomPartPositioningTypeAttribute
The CustomPartPositioningTypeAttribute class is used for defining the positioning type for custom part. The attribute is initialized from the custom attribute [CustomPartPositioningTypeAttribute(CustomPartBase.CustomPartPositioningType.POSITIONING_BY_EXTREMA)] in the custom part source.
Public class DetailTypeAttribute
The DetailTypeAttribute class is used for storing the detail type. Based on the type the system will then position the detail in the creation. The attribute is initialized from the custom attribute [DetailType(DetailTypeEnum.END)] in the connection source.
Public class DrawingPluginBase
The DrawingPluginBase class is an abstract base class for drawing plug-ins.
Public class DrawingPluginBaseInputDefinition
The InputDefinition class is a class for defining the plug-in dependency over the input (points or identifiers). The user implemented method DefineInput() of the DrawingPluginBase interface should return an array list of input definition instances. This defines the points and identifiers the plug-in will receive as input when the Run() method is called.
Public class InputObjectDependencyAttribute
The InputObjectDependencyAttribute class is used for storing an input object dependency which determines when the plug-in is updated in the system. The attribute is initialized from the custom attribute [InputObjectDependency(PluginBase.InputObjectDependency Type)] in the plug-in source.
Public class InputObjectTypeAttribute
The InputObjectTypeAttribute class is used for storing the type of the input. Based on the type the system can then correctly ask for user input in the creation. The attribute is initialized from the custom attribute [InputObjectType(ConnectionBase.InputObjectType.INPUTOBJECT_PART)] in the connection source.
Public class PluginAttribute
The PluginAttribute class is used for storing the name of the plug-in to the system. The attribute is initialized from the custom attribute [Plugin("PluginName")] in the plug-in source.
Public classCode example PluginBase
The PluginBase class in an abstract base class for model plug-ins. Model plug-ins have to be inherited from this class. Drawing plug-ins have to be inherited from the DrawingPluginBase.

A plug-in is always executed in the plug-in's local coordinate system. The origin of the plug-in's coordinate system is defined based on the first input object or point. In case the first input is an object, the origin of the plug-in's coordinate system is the first input point of the object. In case the first input is a point, the origin of the plug-in's coordinate system is the input point. The X- and Y-axes of the coordinate system are defined in the current plane.

Public class PluginBaseInputDefinition
The InputDefinition class is a class for defining the plug-in dependency over the input (points or identifiers). The user implemented method DefineInput() of the PluginBase interface should return an array list of input definition instances. This defines the points and identifiers the plug-in will receive as input when the Run() method is called.
Public class PluginCoordinateSystemAttribute
The PluginCoordinateSystemAttribute class is used for defining the coordinate system type for model plug-ins which are using points as an input. The attribute is initialized from the custom attribute [PluginCoordinateSystem(PluginBase.CoordinateSystemType Type)] in the plug-in source. If attribute is not defined or attribute has value PluginBase.CoordinateSystemType.FROM_FIRST_POINT_AND_GLOBAL coordinate system is calculated as earlier. The attribute is used if the first Inputdefinition object contains at least two points (defined by two points, line, face or polygon).
Public class PluginDescriptionAttribute
Not supported at the moment.
Public class PluginNameAttribute
Not supported at the moment.
Public class PluginUserInterfaceAttribute
The PluginUserInterfaceAttribute class is used for storing the description of the plug-in user interface to the system. The attribute is initialized from the custom attribute [PluginUserInterface(PluginName.UserInterfaceDefinitions.Plugin1)] in the plug-in source. In this case the description string Plugin1 is a dialog written in inp format. If the plug-in dialog is inherited from the PluginFormBase the description string contains a class name of the dialog i.e. [PluginUserInterface("Model_Plug_in1.MainForm")].
Public class PositionTypeAttribute
The PositionTypeAttribute class is used for storing the position type of the connection. Based on the type the system will then position the connection in the creation. The attribute is initialized from the custom attribute [PositionType(PositionTypeEnum.COLLISION_PLANE)] in the connection source.
Public class SeamInputTypeAttribute
The SeamInputTypeAttribute class is used for identifying that the connection is a seam and defining the input type. Based on the type the system will then ask for the correct number of input points in the creation. The attribute is initialized from the custom attribute [SeamInputType(ConnectionBase.SeamInputType.INPUT_POLYGON)] in the connection source.
Public class SecondaryTypeAttribute
The SecondaryTypeAttribute class is used for storing the number of needed secondaries in the connection. Based on the type the system can then correctly ask for user input in the creation. The attribute is initialized from the custom attribute i.e. [SecondaryType(ConnectionBase.SecondaryType.SECONDARYTYPE_ONE)] in the connection source.
Public class StructuresFieldAttribute
The StructuresFieldAttribute class is used for mapping a database attribute to a data field that the plug-in uses in execution. The attribute is initialized from the custom attribute [StructuresField(attributeName)] in the plug-in source. In the plug-in the data field must be public and the type must be double, integer or string.
Enumerations
  Enumeration Description
Public enumeration ConnectionBaseInputObjectType
Defines the input object type.
Public enumeration ConnectionBaseSeamInputType
Defines the type of the input.
Public enumeration ConnectionBaseSecondaryType
Defines how many secondaries a connection can have.
Public enumeration CustomPartBaseCustomPartInputType
Defines the type of the input.
Public enumeration CustomPartBaseCustomPartPositioningType
Defines the type of the positioning.
Public enumeration DrawingPluginBaseInputDefinitionInputTypes
The possible input types for a drawing plug-in.
Public enumeration DrawingPluginBaseUpdateMode
Defines the update mode of the drawing plug-in. The update mode tells the system when the plug-in is executed.
Public enumeration PluginBaseCoordinateSystemType
Defines the coordinate system type for model plug-ins which are using points as an input.
Public enumeration PluginBaseInputDefinitionInputTypeEnum
The possible input types for a plug-in.
Public enumeration PluginBaseInputObjectDependency
Defines the input object dependency type for model plug-ins.