ModelHandler Class |
The ModelHandler class provides information about the currently open Tekla Structures
model.
Inheritance Hierarchy
Namespace: Tekla.Structures.Model
Assembly: Tekla.Structures.Model (in Tekla.Structures.Model.dll) Version: 2024.0.0+a110b435391768740483e3032720a566518c9a63
Syntax
The ModelHandler type exposes the following members.
Constructors
Name | Description | |
---|---|---|
ModelHandler | Creates a new ModelHandler instance. |
Methods
Name | Description | |
---|---|---|
Close | Closes current model. | |
CreateNewMultiUserModel | Creates a new multi-user model. | |
CreateNewSingleUserModel | Creates a new single user model. | |
IsModelAutoSaved | Tells whether a model has auto saved information. | |
IsModelSaved | Tells whether current model has been saved. | |
Open | Opens a new model to Tekla Structures without saving changes to current model. | |
Save(String, String) | Saves current model with comment and user information. | |
Save(String, String, String) | Saves current model with comment and user information. |
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