The set of interfaces exposed by the BrainVoyager COM server are organized within the following simple object model:
An object can provide methods and/or properties. The top-level object of BrainVoyager's object model is the application object which is returned when launching the BrainVoyager COM server, i.e. using the CreateObject function in VBScript:
Set BrainVoyager = CreateObject("BrainVoyager.1")
The variable "BrainVoyager" now contains a reference to the application object. In the method descriptions, the variable for the application object is called objBrainVoyager. The application object currently provides two properties, ActiveDocument and Documents, and the following methods: CreateProjectFMR, CreateProjectMosaicFMR, CreateProjectVMR, CreateProjectAMR, OpenDocument, Exit, GetTime, GetCurrentFolder, ScriptLaunchedByBV. The first property and the first five methods create and/or return a document object which is the most important object providing most methods of the COM server (see "Alphabetical Listing of Methods"). The last four methods of the application document provide useful utility functions. The property Documents returns the third available object, the document collection object. The collection object can be used to enumerate all projects currently existing within the launched BrainVoyager instance. The accessed individual document objects can be used to invoke document methods. A simple example is shown below which closes all open documents before exiting BrainVoyager.
Set docs = BrainVoyager.Documents
For Each doc In docs
doc.Close
Next
BrainVoyager.Exit