QPR Knowledge Base 2017.1

GetGraph

GetGraph

Previous topic Next topic No directory for this topic  

GetGraph

Previous topic Next topic Topic directory requires JavaScript Mail us feedback on this topic!  

Revision history:

Introduced in QPR 7.3.1

Last changed in QPR 2012.2

 

Stores the graphical image of a selected diagram to the file GraphFileName. GraphFileName i.e. Graphics File Name with the full path is given as a parameter. Additional options can also be defined in the function call.

 

Synopsis:

 

PGModel.GetGraph(ElementId, GraphFileName, Options)

 

Parameters:

 

ElementId: Integer. ID of the desired element. In the case this is 0, the top level diagram is stored.

GraphFileName: String. Graph file name with a full path included. In the case this parameter is empty, the graph is placed on the clipboard in enchanced metafile format.

Options: String. A ";" separated list of additional parameters. The following options are supported:

TYPE

PNG

BMP (bitmap)

TIF

JPG (Jpeg, default)

VIEWSETTINGS

<View Settings ID> Integer. Sets the view setting identified by <View Settings ID> to the graph that is generated. If a view settings ID is not given, an "all visible" view setting is is used.

 

Required Rights:

 

View rights to the diagram.

 

Return Values:

Below are listed the return values that this function can return:

 

RV_SUCCESS

RV_APPLICATION_QUIT_CALLED

RV_CANNOT_WRITE_TO_FILE

RV_CANNOT_COPY_TO_CLIPBOARD

RV_ELEMENT_NOT_FOUND

RV_ELEMENT_IS_NOT_SUBPROCESS

RV_INVALID_VIEW_SETTINGS

RV_NO_RIGHTS_TO_MODEL

RV_FUNCTION_CANNOT_BE_USED_IN_VALIDATION_SCRIPT

 

Example Procedure:

 

iResult = PGModel.GetGraph(2345,"C:\temp\flowchart.png", _

              "TYPE=PNG")