Extending product function with other projects : Overview of extending SA with other projects
  
Overview of extending SA with other projects
Hosting an external COM object within System Architect as if it were a macro
There is now support for initiating instances of COM classes made available from applications that are external to the family of the System Architect application and its components. This gives the advantage that the external component will be loaded when System Architect starts.
In the Macros section of the file sa2001.ini, there may be some numbered TemporaryAutoLoad references as part of the VBA support referenced macro projects. There is now support for the following structure:
TemporaryAutoLoadn=path\filename.dll|COM|Project1|Class1
The filename is there to aid visual identification and is used as a key for the other information. The project and class name are used to create the object.
Should there be a need to provide multiple classes defining entry points for execution, this is also supported. Provide a function of these characteristics GetInterface(ByVal s As String) As Object in the named main class and use that function to return references to instances of the named class.
When inserting menu options using the API function InsertMacroItemInMenu, you specify project.module.routine as the macro name. The project name matches the name of your project. The module name should match the target class name. System Architect invokes the function GetInterface to obtain a reference to the class instance and then invokes the named routine. If the function does not exist or does not return a reference then the instance of the main class named in the ini entry is used.
For information on the System Architect object model and other API elements, see Introduction to extending SA with VBA.
Connecting to System Architect from an external application
System Architect publishes COM classes which can be used to report on and update the contents of an encyclopedia.
In Microsoft programming terms, you set up a reference from your application to the file SA2001.exe and create a new instance of the Application class. You access the encyclopedia through the Encyclopedia attribute of the Application object.
For information on the System Architect object model and other API elements, see Introduction to extending SA with VBA.