QPR Knowledge Base 2017.1

CreateBranch

CreateBranch

Previous topic Next topic No directory for this topic  

CreateBranch

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

Revision history:

Introduced in QPR 8.1

Last changed in QPR 2012.2

 

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

RV_FUNCTION_CANNOT_BE_USED_IN_VALIDATION_SCRIPT
 

Example Procedure:

 

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