![]() | PluginFormBase Class |
The PluginFormBase class is the base class for plug-in dialogs. The class extends
the FormBase class by adding communications with Tekla Structures.
![](/modules/custom/trimble_html_import/icons/SectionExpanded.png)
SystemObject
SystemMarshalByRefObject
System.ComponentModelComponent
System.Windows.FormsControl
System.Windows.FormsScrollableControl
System.Windows.FormsContainerControl
System.Windows.FormsForm
Tekla.Structures.DialogFormBase
Tekla.Structures.DialogPluginFormBase
SystemMarshalByRefObject
System.ComponentModelComponent
System.Windows.FormsControl
System.Windows.FormsScrollableControl
System.Windows.FormsContainerControl
System.Windows.FormsForm
Tekla.Structures.DialogFormBase
Tekla.Structures.DialogPluginFormBase
Namespace: Tekla.Structures.Dialog
Assembly: Tekla.Structures.Dialog (in Tekla.Structures.Dialog.dll) Version: 2024.0.0+a110b435391768740483e3032720a566518c9a63
![](/modules/custom/trimble_html_import/icons/SectionExpanded.png)
The PluginFormBase type exposes the following members.
![](/modules/custom/trimble_html_import/icons/SectionExpanded.png)
Name | Description | |
---|---|---|
![]() | PluginFormBase |
Runs the FormBase constructor and loads the default .NET localization file (DotNetDialogStrings.ail).
|
![](/modules/custom/trimble_html_import/icons/SectionExpanded.png)
Name | Description | |
---|---|---|
![]() | Localization |
The localization instance for the dialog. Each dialog has its own localization instance
that has read the localization files needed for that dialog.
(Inherited from FormBase.) |
![]() | ShowInTaskbar |
Hides (shadows) the ShowInTaskbar property by setting the property to false.
|
![](/modules/custom/trimble_html_import/icons/SectionExpanded.png)
Name | Description | |
---|---|---|
![]() | 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.
(Inherited from FormBase.) |
![]() | Get |
Gets the dialog values from the part that is currently selected in Tekla Structures.
|
![]() | 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.
(Inherited from FormBase.) |
![]() | InitializeForm |
Prepares the data storage for the dialog and scans through the fields.
(Inherited from FormBase.) |
![]() | 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.
(Inherited from FormBase.) |
![]() | 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.
(Inherited from FormBase.) |
![]() | ReloadForm |
Reloads the dialog values.
|
![]() | SaveValues |
Serializes the dialog values to an xml file.
(Inherited from FormBase.) |
![]() ![]() | 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.
(Inherited from FormBase.) |
![]() | ShowForm |
Displays the form.
(Inherited from FormBase.) |
![]() | UpdateValues | Obsolete.
Rereads and updates all the field values on the form.
(Inherited from FormBase.) |
![](/modules/custom/trimble_html_import/icons/SectionExpanded.png)
Name | Description | |
---|---|---|
![]() | AttributesLoadedFromModel |
The AttributesLoadedFromModel event is triggered just after the attributes have been loaded
from the model into the dialog.
|
![](/modules/custom/trimble_html_import/icons/SectionExpanded.png)
The following example shows a situation where a class is created by using inheritance from the PluginFormBase. Due to limited space a
better example is located in the Open API Start-up Package in Extranet. The name of the example is FormPlugin.
using System; using System.Collections.Generic; using System.Drawing; using System.Text; using System.Windows.Forms; using Tekla.Structures.Datatype; using Tekla.Structures.Dialog; public class Example1 : PluginFormBase { private void InitializeComponent() { this.OkButton = new System.Windows.Forms.Button(); this.ModifyButton = new System.Windows.Forms.Button(); this.SuspendLayout(); // // OkButton // this.structuresExtender.SetAttributeName(this.OkButton, null); this.structuresExtender.SetAttributeTypeName(this.OkButton, null); this.structuresExtender.SetBindPropertyName(this.OkButton, null); this.OkButton.Name = "OkButton"; this.OkButton.Text = "OK"; this.OkButton.Click += new System.EventHandler(this.OkButton_Click); // // ModifyButton // this.structuresExtender.SetAttributeName(this.ModifyButton, null); this.structuresExtender.SetAttributeTypeName(this.ModifyButton, null); this.structuresExtender.SetBindPropertyName(this.ModifyButton, null); this.ModifyButton.Name = "ModifyButton"; this.ModifyButton.Text = "Modify"; this.ModifyButton.Click += new System.EventHandler(this.ModifyButton_Click); // // Example1 // this.structuresExtender.SetAttributeName(this, null); this.structuresExtender.SetAttributeTypeName(this, null); this.structuresExtender.SetBindPropertyName(this, null); this.Controls.Add(this.ModifyButton); this.Controls.Add(this.OkButton); this.Name = "Example1"; this.ResumeLayout(false); } public Example1() { InitializeComponent(); } private void OkButton_Click(object sender, EventArgs e) { this.Apply(); this.Close(); } private void ModifyButton_Click(object sender, EventArgs e) { this.Modify(); } private System.Windows.Forms.Button OkButton; private System.Windows.Forms.Button ModifyButton; }
![](/modules/custom/trimble_html_import/icons/SectionExpanded.png)