Creating documents from within a program
In order to create a document from within a program, one has to call the property function Property::createDocument():
myClass.createDocument(tplPath,docPath);
tplPath is the complete path to document template, docPath is the complete document path. The calling object (myClass) is, usually, a property handle with an selected instance, which acts as starting instance for the document generation.