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.

Model Class

The Model class represents a single model open in Tekla Structures. Before interaction with the model, the user will have to create one instance of this class.
Inheritance Hierarchy
SystemObject
  Tekla.Structures.ModelModel

Namespace:  Tekla.Structures.Model
Assembly:  Tekla.Structures.Model (in Tekla.Structures.Model.dll) Version: 2019.0.0.0 (2019.0.0.0)
Syntax
[SerializableAttribute]
public sealed class Model

The Model type exposes the following members.

Constructors
  Name Description
Public method Model
Creates a "handle" to the currently open model.
Top
Methods
  Name Description
Public method CommitChanges
Commits the changes made to the model database so far. One commit is something that a user can later on undo with the undo command. A commit also launches the drawing of the changed product model to the visible views. A dependent plug-in should never call CommitChanges, since this would make undo very difficult for the user to do. However, non-dependent plug-ins require a separate commit if new objects are created.
Public method CommitChanges(String)
Commits the changes made to the model database so far. One commit is something that a user can later on undo with the undo command. A commit also launches the drawing of the changed product model to the visible views. A plug-in should never call CommitChanges, since this would make undo very difficult for the user to do.
Public methodCode example FetchModelObjects
Fetches a list of modelobjects based on given guid list of objects, checks if guid is native or external (for reference model object) and optionally selects objects before returning them.
Public method GetClashCheckHandler
Returns a new clash check handler.
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 method GetGUIDByIdentifier
Returns the GUID of the given identifier instance.
Public method GetIdentifierByGUID
Returns an identifier instance that has the given GUID in the model.
Public method GetInfo
Returns information about the currently open model.
Public method GetModelObjectSelector
Returns a ModelObjectSelector instance from which different kind of selections can be made.
Public method GetPhases
Returns information about the current model's phases.
Public method GetProjectInfo
Returns information about the current model's project.
Public method GetWorkPlaneHandler
Returns a new work plane handler for the model. The work plane handler can be used to manipulate the current work plane in the model.
Public method SelectModelObject
Takes as input an identifier to an object and then checks its type and instantiates and selects it before returning it.
Top
See Also