APGen Documentation Previous Topic: APGen Object Reference Next Topic: APGen.Values Collection Parent Topic: APGen Object Reference    APGen Object Reference
APGen Object
See Also:

The APGen object encapsulates an Active Page Generator application.  It acts as a parent object for multiple APGScript objects, and specifies global settings for child APG scripts.

ProgID

"APGen.2.1"

Version Independent ProgID

"APGen"

CLSID

CLSID_APGen, normally found in Program Files\APGen\include\APGen.h

Syntax

oAPGen[ (key | index) | .collection | .property | .method ]

Within an APG script, the intrinsic APGen object is named APGen:

APGen[ (key | index) | .collection | .property | .method ]

Object

oAPGen An APGen object. 

Collection Parameters

key A string key to the Values collection.
index A zero-based index to the Values collection.

Collection

Values The default collection for the APGen object.  Values stored in this collection are accessible by all child APGScript objects.

Properties

Version Float Returns the Active Page Generator product version that is currently running.
OutputDir String Sets/returns the default output directory for child APG scripts.
LogDir String Sets/returns the default log directory for child APG scripts.
StatusDlg ApgStatusDlgEnum Sets/returns how the status dialog should be displayed for child APG scripts.
Debug True/False Sets/returns whether debugging and error dialogs are enabled for child APG scripts.
BufferOutput True/False Sets/returns whether output is buffered for child APG scripts.
WriteIffChanged True/False Sets/returns whether the output file is overwritten only when its content changes.
Logon Logon object Returns a Logon object that can be used to set the default logon for Output and Log objects.

Methods

Run() Execute an APG script.
RunArgs() Execute an APG script with a list of arguments.
OpenScript() Load an APG script and return a new APGScript object.

Notes

See the Programmatic Execution topic for more information on how to use the APGen object.

Figure 1 shows a diagram of the APGen object:

Figure 1: APGen Object
 

To use the APGen object interface in C++, use the IAPGen interface in <install dir>\include\APGen.h.  For more information, see Executing APG Script in C++.