Wizard overrides - SmartPlant Foundation - IM Update 44 - Customization & Programming - Hexagon

SmartPlant Foundation Customization

Language
English
Product
SmartPlant Foundation
Search by Category
Customization & Programming
SmartPlant Foundation / SDx Version
10

Any form that is maintained by Form Builder is known as a Dynamic form. There are various modes for displaying these Dynamic forms, and to display each mode, there is a specific wizard class that inherits from the base Wizard class. In some cases the wizard will just have one page that will be the form page.

  • Create – wizard class: CreateWizard

  • Copy – wizard class: CopyWizard

  • Details/Info – wizard class: InfoWizard

  • Update – wizard class: UpdateWizard

  • Query – wizard class: QueryWizard

It is possible to override each of the above wizard classes once. On startup of the Desktop Client it will look for any custom classes that inherit from any of the above, and anytime the wizard is constructed, it will construct the custom class.

Namespace SPF.Client.Forms.Wizard

Public Class CustomCreateWizard

Inherits SPF.Client.Forms.Wizard.CreateWizard

In the example above, a typical class definition was used to override the CreateWizard, so any create forms will use this custom wizard.

You will need to add the set of constructors to your class; there are different constructors depending on how it is called. An example would be if it is a classified object or will be related to another object.

Public Sub New(ByRef pobjSPFWindowsFormsClient As SPFWindowsFormsClient, ByVal pobjClassification As IObject, ByVal pobjISPFMethod As ISPFMethod)

MyBase.New(pobjSPFWindowsFormsClient, pobjClassification, pobjISPFMethod)

Initialize()

End Sub

Public Sub New(ByRef pobjSPFWindowsFormsClient As SPFWindowsFormsClient, _

ByVal pobjClassification As IObject, _

ByVal pobjMethod As ISPFMethod, _

ByVal pstrRelatedRelDef As String, ByVal pobjRelatedObject As IObject)

MyBase.New(pobjSPFWindowsFormsClient, pobjClassification, pobjMethod, pstrRelatedRelDef, pobjRelatedObject)

Initialize()

End Sub

Private Sub Initialize()

End Sub