API (or Application Programming Interface) provides automation options for CM4D.
The only object that is created directly is the QaDoc object. Creating this object executes CM4D and provides an object for document manipulation. All of the other objects are created through the use of a parent object, starting with the QaDoc object at the root.
QaDoc
Some commonly used objects are:
QaDataSource
QaQuery
QaDataSet
QaRoutine
QaFeature
QaSample
QaAnnot
QaStyle
QaSheet
QaSheetSet
QaManagedDocument
QaManagedReport
QaView
Refer to the following examples of API implementation:
Event Trigger 2 (External Event)
No Events (External Event)
Report Record Database and API
Download PDF of all API Objects and Methods here:

1. Boolean
Definition: A data type that can hold one of two values: true or false.
Purpose: Used for properties that represent binary states or flags.
Examples:
- AllowPrintScheduler = true → Printing from the scheduler is allowed.
- SchedulerRefreshAutoReport = false → Auto-report refresh is disabled.
2. BSTR (Basic String)
Definition: A composite data type that consists of a length prefix, a data string, and a terminator.
Characteristics:
- It is a pointer to a wide-character string (Unicode).
- It includes a length prefix and is null-terminated.
- Purpose: Used for textual data that may be passed between different programming languages or systems.
Example:
- Label = "Monthly Report" → A descriptive name for a document or object.
3. Double
Definition: A double-precision floating-point number.
Purpose: Used for numeric values that require decimal precision.
Examples:
- Length = 11.0 → The length of a sheet in inches.
- Width = 8.5 → The width of a sheet in inches.
4.Enumeration (enum)
Definition: A keyword for declaring enumerations. Enumerations are a user-defined type consisting of a set of named values. An enumerator is a name identifying a value of an enumeration.
Common Values:
Portrait
Landscape
Purpose: To standardize orientation options for documents or sheets.
Example:
Orientation = Landscape → The sheet is wider than it is tall.
5. Void
Definition: Valueless.