Building a Console Application in VB for the Alibre Design API - Hooking Alibre Design E-mail
Article Index
Building a Console Application in VB for the Alibre Design API
Getting Started
Create a Visual Basic Project
Referencing the Alibre Design API
Importing Namespaces
Adding Comments
Setting Up Command Line Flags
Reading the Command Line Arguments
Redirecting the Standard Output
Hooking Alibre Design
Looping Through Sessions
Looping Through Configurations
Finishing Up
Resources
All Pages

Hooking Alibre Design

Now we need to contact Alibre Design through COM. Be sure that Alibre Design is currently running on your system when you start this application. The "Root" in this case is basically the top-level Alibre Design application -- like the Home window -- and it allows us to do things such as displaying the Alibre Design version number (line 46).

    ' Hook Alibre Design
    Dim hook As AutomationHook = _
      Marshal.GetActiveObject("AlibreX.AutomationHook")
    Dim root As IADRoot = hook.Root

    ' Write out the "Version:" then the Alibre Design version
    Call Console.WriteLine("Version: " & root.version)



Last Updated ( Monday, 28 January 2008 16:22 )