ArtisanModelFileDialog COM object (automation interface)
The ArtisanModelFileDialog COM object allows you to open the Modeler Open Model dialog. It has two functions named Create and CreateEx:
• The Create function opens the dialog and returns the reference of the selected model.
• The CreateEx function opens the dialog and returns the reference, id and name of the selected model.
Create function
Syntax:
Create (True)
The Create function opens the Open Model dialog for you to select a model to open in Modeler, and returns the reference of the selected model.
For example.
Dim Obj = CreateObject("COMGUIUtil.ArtisanModelFileDialog")
Dim strReferences = Obj.Create(True)
CreateEx function
Syntax:
CreateEx (True, "<model reference>", "<model id>", "<model name>")
Where:
• <model reference> specifies the reference of the model that is selected in the Open Model dialog.
• <model id> specifies the id of the model that is selected in the Open Model dialog.
• <model name> specifies the name of the model that is selected in the Open Model dialog.
The CreateEx function opens the Opens Model dialog for you to select a model to open in Modeler, and returns the reference, id and name of the selected model.
For example:
Dim Obj = CreateObject("COMGUIUtil.ArtisanModelFileDialog")
Dim strRef, strID, strModelName as String
Obj.CreateEx(True, strRef, strID, strModelName )
If ( strRef or strID or strModelName is empty )
{
// error encountered ( Appropriate Msgs will be displayed for such error )
}
Else
// Do something
End If