Working with Microsoft Visual Basic .NET (automation interface)
Microsoft Visual Basic .NET (VB .NET) projects can use the Modeler automation interface; however, the supplied example projects will not work with VB .NET as provided, because Microsoft Visual Basic .NET uses strictly typed early-binding by default.
|
Microsoft Visual Basic 6 uses weakly typed late-binding by default.
|
There are two ways you can use the Modeler automation interface with your VB. NET projects:
• Use the default strictly typed early-binding and directly reference the Modeler automation interface type library.
• Use weakly typed late-binding in your project.
|
If you want a Visual Basic or C# application to work with Modeler on a 64-bit Windows operating system, you must build the application to run as a 32-bit application. To do this, set the Target CPU up as X86 on the Advanced Compilation dialog.
|
Using Strictly Typed Early-binding
If you want to use strictly typed early-binding, you must reference the Modeler Automation Server, Enterprise OLE Automation 1.0 Type Library (ENT6Lib), as demonstrated is the following code:
Dim objProjects as ENT6Lib.CCaseProjects
Dim objProject as ENT6Lib.CCaseProjects
Dim objDict as ENT6Lib.CCaseProjects
objProjects = New ENT6Lib.CCaseprojects()
objProject = objProjects.Item("Active Project")
objDict = objProject.Item("Dictionary")
Using Weakly Typed Late-binding
If you want to use weakly typed late-binding, you can set it up as an option for your project, or you can set it up only for the modules, forms and classes that access the Modeler automation interface:
• For a project, set up weakly typed late-binding as a project option.
• For a module, form or class, use the 'Option Strict Off' statement to enable weakly typed late-binding.