BIM VILLAGE

Version 2.5.1

COM API

Overview

The COM API that allows external programs to interact with our software,
enabling greater flexibility and integration capabilities. With the COM API,
users can now easily automate routine tasks, exchange data with other applications,
and build custom solutions tailored to their specific needs.

Component Object Model

‘Component Object Model (COM) is a binary-interface standard for software components introduced by Microsoft in 1993. It is used to enable inter-process communication object creation in a large range of programming languages. COM is the basis for several other Microsoft technologies and frameworks, including OLE, OLE Automation, Browser Helper Object, ActiveX, COM+, DCOM, the Windows shell, DirectX, UMDF and Windows Runtime.’
(Wikipedia: https://en.wikipedia.org/wiki/Component_Object_Model)

How to use

Beaver is a CAD-like application that exposes a COM API for developers to create plug-ins.
Once Beaver is installed and started with administrator privileges, the COM API is registered on the computer.
To create a plug-in project in C# using the Beaver, developers can reference the registered
Beaver COM API in their Visual Studio project and use the exposed interfaces to interact with Beaver’s functionalities.

Here are the steps to create a C# project that utilizes the Beaver COM API:

  1. Install Beaver on your computer and ensure that it is started with administrator windows rights.
  2. Open Visual Studio and create a new C# project.
  3. In the Solution Explorer, right-click on the project name and select “Add Reference”.
  4. In the Reference Manager, select the “COM” tab and search for “Beaver”.
  5. Select the Beaver COM API from the list and click “OK” to add it to your project references.
  6. In your C# code, add a using statement for the Beaver namespace and begin utilizing the exposed API methods.

For example:

using Beaver;
namespace BeaverComSample
{
	public class Sample
	{
		public static void Execute()
		{
			Beaver.BcadApplication app = new Beaver.BcadApplication();
			Beaver.BcadDocuments docs = m_app.Documents;
			var newDoc = app.Documents.Open(@"C:\temp\test.ifc");
			// Do something.
	
		}
	}
}

Note that the specific methods and functionality available through the Beaver API will depend on the version of Beaver you are using and the permissions granted to your user account.


© 2019 - 2022 BIM VILLAGE.