As Cimatron E API uses the COM based approach, to start working with it in a Visual Basic application, you need to add references to all type libraries you going to use.
Cimatron E API uses the hierarchical object model. This means that if an object stays at the top of the hierarchy, other objects are derived from it.
These kinds of objects are the Application objects of Cimatron E API.
To get an Application object of a running active Cimatron E application, use the AppAccess object. Its interface (IAppAccess) allows you to connect to a running active Cimatron E application by returning a pointer to the IApplication interface of the Application object.
If there is no running Cimatron E application or you want to start a new one, you have to create an instance of the Application object and receive a pointer to the IApplication interface.
Once you have a pointer to the IApplication interface, you can start to execute a task of your user application.
There is no any special requirement for the type of project you can create in MS Visual Basic.
To start using API in your Visual Basic application you have to:
Create references to Cimatron E API type libraries by opening menu Project -> References and selecting all type libraries you are going to use. It is recomended to attach all Cimatron E API type libraries: CimAppAccess.tlb, CimatronE.tlb, CimBaseAPI.tlb, CimMdlrAPI.tlb, CimServicesAPI.tlb.
After referencing the type libraries you have definitions of all API interfaces. Next step is to get an IApplication interface.
Dim gAppAccess As New AppAccess 'Define an AppAccess object to get running active application
Dim gApp As Application 'Define an Application object
Set gApp = gAppAccess.GetApplication 'Getting running active application
If gApp Is Nothing Then
'There is no running Cimatron E Application
Set gApp = New Application 'Creating new instance of Cimatron E application
End If
Now you are ready to use the power of Cimatron E API.