What is external API?
External API is library defined typically for external usage, which means to produce JC4XL document silently by a service in the background, or interactively attach to running Excel instances and extend the sheets with JC4XL structures from a different desktop application.
How to access it?
(1.1 Type Library from JC4XL 1.1.4)
#import "libid:2D09FA5A-9FD9-46E6-A4E3-3327BF6E48EB" raw_interfaces_only named_guids
using namespace JChemExcelCOMInterfacesLib;
#import "libid:3ADEBF5E-5174-42B9-9EA4-C7FB03B2C427" raw_interfaces_only named_guids
using namespace JChemExcelAPILib;
and compile stdafx.cpp afterwards.
or browse the COM library similarly how it was described in the first point (VBA)
Helper functions in External API library
The library contains several functions, properties defined on ExternalAPI COM object to help you access the running JC4XL instances and provide some additional routine prior to using the real API calls (see API Interface section above). Helpers are useful since not necessary to include Excel reference to operate with API routines. (Available versions are 1.0 and 1.1).
Before calling any of main API functions the active instance should be set on the External API object. Available Excel and JC4XL plug-in instances can be retrieved by calling GetInstanceIds function. Instance id list includes the „New Instance” constant as well for creating new hidden or visible JC4XL workbook instances (for JC4XL document service purposes).
How to instantiate External API?
Dim api As JChemExcelAPILib.ExternalAPI
private var api = new JChemExcelAPILib.ExternalAPIClass();