DocumentGenerator Class

The DocumentGenerator Class provides an interface to the document and web reporting facilities, which you can use to generate reports on specific packages, diagrams and elements in your model. This Class is accessed from the Repository Class using the CreateDocumentGenerator() method.

DocumentGenerator Attributes

Attribute

Type

Notes

See Also

ObjectType

ObjectType

Read only

Distinguishes objects referenced through a Dispatch interface.

 

 

DocumentGenerator Methods

Method

Type

Notes

See Also

DocumentDiagram (
long diagramID,
long nDepth,
string templateName)

Boolean

Documents a diagram.

Parameters:

diagramId: Long - the ID of the diagram
nDepth: Long - the depth by which to adjust the heading level
templateName: String - the name of a template to use when documenting diagrams; this can be blank
 

 

DocumentElement (
long elementID,
long nDepth,
string templateName)

Boolean

Documents an element.

Parameters:

elementId: Long - the ID of the element
nDepth: Long - the depth by which to adjust the heading level
templateName: String - the name of a template to use when documenting elements; this can be blank
 

 

DocumentModelAuthor (
string name,
long nDepth,
string templateName)

Boolean

Documents a model author.

Parameters:

name: String - the name of the author
nDepth: Long - the depth by which to adjust the heading level
templateName: String - a template to use when documenting model authors; this can be blank
 

 

DocumentModelClient (
string name,
long nDepth,
string templateName)

Boolean

Documents a single model client.

Parameters:

name: String - the name of the client
nDepth: Long - the depth by which to adjust the heading level
templateName: String -  a template to use when documenting model clients; this can be blank
 

 

DocumentModelGlossary (
long id,
long nDepth,
string templateName)

Boolean

Documents a single model glossary term.

Parameters:

id: Long - the ID of the term
nDepth: Long - the depth by which to adjust the heading level
templateName: String -  a template to use when documenting model glossary terms; this can be blank
 

 

DocumentModelIssue (
long id,
long nDepth,
string templateName)

Boolean

Documents a single model issue.

Parameters:

id: Long - the ID of the issue
nDepth: Long - the depth by which to adjust the heading level
templateName: String - a template to use when documenting model issues; this can be blank
 

 

DocumentModelResource (
string name,
long nDepth,
string templateName)

Boolean

Documents a single model resource.

Parameters:

name: String - the name of the resource
nDepth: Long - the depth by which to adjust the heading level
templateName: String -  a template to use when documenting model resources; this can be blank
 

 

DocumentModelRole (
string name,
long nDepth,
string templateName)

Boolean

Documents a single model role.

Parameters:

name: String - the name of the role
nDepth: Long - the depth by which to adjust the heading level
templateName: String - a template to use when documenting model roles; this can be blank
 

 

DocumentModelTask (
long id,
long nDepth,
string templateName)

Boolean

Documents a single model task.

Parameters:

id: Long - the ID of the the task
nDepth: Long - the depth by which to adjust the heading level
templateName: String -  a template to use when documenting model tasks; this can be blank
 

 

DocumentPackage (
long packageID,
long nDepth,
string templateName)

Boolean

Documents a package.

Parameters:

packageId: Long - the ID of the package
nDepth: Long - the depth by which to adjust the heading level
templateName: String - a template to use when documenting packages; this can be blank
 

 

GetLastError()

String

Returns a string value describing the most recent error that occurred in relation to this object.

 

 

InsertBreak (
long breakType)

Boolean

Inserts a break into the report at the current location.

Parameters:

breakType: Long - 0 = page break, 1 = section break
 

DocumentBreak

 

InsertCoverPageDocument (
string name)

Boolean

Inserts the Coverpage into the document at the current location.

Note: The style sheet is applied to the document before it is insert into the generated document.

 

Parameters:

name: String - the name of the Cover page document found in the Resource tree
 

 

InsertLinkedDocument (
string guid)

Boolean

Inserts a linked document into the report at the current location.

A linked document can used to set the header and footer of the report. These are taken from the first linked document added to the report.

Parameters:

guid: String - the GUID of the element that has a linked document

 

 

InsertTableOfContents

Boolean

Inserts a Table of Contents at the current position.

 

 

InsertTeamReviewPost (
string path)

Boolean

Inserts a Team Review posting into the report at the current location.

Parameters:

path: String - the path of the Team Review post
 

 

InsertText (
string text,
string style)

Boolean

Inserts static text into the report at the current location.

A carriage return is not included; if you need to use one, you can add it manually.

Parameters:

text: String - the static text to be inserted
style: String - the name of the style in the template; defaults to Normal style
 

 

InsertTOCDocument (
string name)

Boolean

Inserts the Table of Contents into the document at the current location.

Note: The stylesheet is applied to the document before it is insert into the generated document.

Parameters:

name: String - the name of the Table of Contents document found in the Resource tree
 

 

NewDocument (
string templateName)

Boolean

Starts a new document; you call this before attempting to document anything else.

Parameters:

templateName: String - the name of a template to use when documenting elements; this can be blank
 

 

ReplaceField (
string fieldname,
string fieldvalue)

Boolean

Replaces the Section field identified by the fieldname parameter with the value provided in fieldvalue.  For example:

 

ReplaceField ("Element.Alias", "MyAlias")

 

If you call this function more than once with the same fieldname, the field only has the most recent value set.

Parameters:

fieldname: String - the field name to find (this does not include the {} braces)
fieldvalue: String - the value to insert into the field; this can be a constant or a derived value
 

 

SaveDocument (
string filename,
long nDocType)

Boolean

Saves the document to disk.

Parameters:

filename: String - the filename to save the file to
nDocType: Long - 0 = RTF, 1 = HTML, 2 = PDF,
3 = DOCX
 

DocumentType

 

SetPageOrientation (
long pageOrientation)

Boolean

Sets the current page orientation.

Parameters:

pageOrientation: Long - 0 = Portrait, 1 = Landscape
 

DocumentPageOrientation

 

SetStyleSheetDocument (
string name)

Boolean

Sets the Stylesheet to be used for TOC, Coverpage and templates used.  This can be called before NewDocument (above).

Parameters:

name: String - the name of the stylesheet found in the Resource tree
 

 

Learn more