Navigation:  »No topics above this level«

Object Model Reference

Previous pageReturn to chapter overviewNext page

The Visual Build core server components are implemented as 32-bit and 64-bit COM (Component Object Model) classes and can be invoked from script (both internal and external to Visual Build) and from any other language that integrates with COM.  All classes and interfaces support early and late (IDispatch) binding and use only automation-compatible types.  This is a powerful capability that allows this and more:

 

1.Access the object model from a Run Script action, script events, or other step or macro properties within a build to access functionality that isn't exposed by the GUI app.  The global items Application, Project, Step, LastStep, FailedStep, Builder, and WScript are available to all script code.  For instance, this could be used to call script code within a conditional build rule to evaluate arbitrary expressions, to dynamically create a project and build it, and more.
2.Create a custom front-end to Visual Build that is specific to your projects.  For instance, this could be used to provide a custom GUI to configure the build and launch it.
3.Access Visual Build from within your application or other environments (for instance, within Windows and .NET applications, Microsoft Excel, Word, etc.).

 

The COM interfaces and coclasses are defined in the type library found in VisBuildSvr.dll in the installation directory.  The type library name is Visual Build Professional 9 Server Objects.  There are two coclasses exposed in the type library: the Application class and the Builder class.  Both of these classes are available as named items when creating script within Visual Build and are also publicly createable.  The following named items are available from script code in script code, events, script actions, and the Run Script action:

 

Application

Project

Builder

Step (the step being built)

LastStep (the last step that was built)

FailedStep (the last step that failed to build)

WScript

 

The object model hierarchy is shown below:

 

Application

       Options

       Project

               Steps

                       Step

               Macros

                       Macro

       Macros

               Macro

       Scripts

               Script

 

Builder

       Application

 

WScript

 

In addition, all the custom action screens and components and logging components are implemented as COM plug-ins.  See the user actions topic for information on creating your own custom action components, and see the VB logging sample component for an example of a custom logger.