ModelHandler Class

The ModelHandler class provides information about the currently open Tekla Structures model.
Inheritance Hierarchy
SystemObject
  Tekla.Structures.ModelModelHandler

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

The ModelHandler type exposes the following members.

Constructors
  NameDescription
Public methodModelHandler
Creates a new ModelHandler instance.
Top
Methods
  NameDescription
Public methodClose
Closes current model.
Public methodCreateNewMultiUserModel
Creates a new multi-user model.
Public methodCreateNewSingleUserModel
Creates a new single user model.
Public methodIsModelAutoSaved
Tells whether a model has auto saved information.
Public methodIsModelSaved
Tells whether current model has been saved.
Public methodOpen
Opens a new model to Tekla Structures without saving changes to current model.
Public methodSave(String, String)
Saves current model with comment and user information.
Public methodSave(String, String, String)
Saves current model with comment and user information.
Top
Examples
The following example opens the model that is in the C:\teklastructuresmodels\NewModel17 folder and shows a message if the opening was successful.
using Tekla.Structures.Model;
using System.Windows.Forms;

public class Example
{
       public void Example1()
       {
           ModelHandler handler = new ModelHandler();
           if (handler.IsModelSaved())
           {
               if (handler.Open("C:\\teklastructuresmodels\\NewModel17"))
                   MessageBox.Show("The model opened successfully.");
           }
           else    
               MessageBox.Show("The current model is not saved.");
       }
}
See Also
Was this helpful?
The feedback you give here is not visible to other users. We use your comments to improve the content.
Previous
Next