QPR Knowledge Base

CreateBranch

Hide Navigation Pane

CreateBranch

Previous topic Next topic No expanding text in this topic  

CreateBranch

Previous topic Next topic JavaScript is required for expanding text Mail us feedback on this topic!  

Comments (...)

Revision history:

Introduced in QPR 8.1

 

Creates a new branch for a server model that has version management enabled. New branches are created under the main version root (i.e. it is not possible to form deeper hierarchies with branches). ID of the created branch is returned.

 

Synopsis:

 

PGModel.CreateBranch(BranchName, Parameters, out Id)

 

Parameters:

 

BranchName: String. Name for the new branch.

Parameters: A semicolon-separated list of parameters for creating a new element. No supported parameters at the moment.

out Id: Variant for storing the returned branch ID.

 

Required Rights:

 

Administrator or model administrator.

 

Return Values:

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

 

RV_APPLICATION_QUIT_CALLED
RV_NOT_CONNECTED_TO_SERVER
RV_MODEL_NOT_OPEN
RV_MODEL_DOES_NOT_USE_VERSION_MANAGEMENT
RV_CANNOT_CREATE_BRANCH_MODEL_MUST_BE_SAVED_FIRST
RV_CANNOT_CREATE_BRANCH_TO_CHECKED_OUT_MODEL
RV_NOT_ENOUGH_RIGHTS
RV_INVALID_MODEL_FOLDER_NAME
RV_MODEL_FOLDER_TEMPLATE_ALREADY_EXISTS
RV_UNKNOWN_ERROR
 

Example Procedure:

 

iResult = PGModel.CreateBranch("Development", "", iBranchId)

Comments (...)