Call to the Get Model API

The syntax for calling the Get Model API client program is as follows.

getmodel.exe -model=<master template name> -file=<master template file>
             -cfg=<repository ini file>
             [<options>]

The code is one line.

Provide values for the parameters as follows:

  • <master template name> Required. Specify the full path of the folder containing the Master Template in KCM Repository. If the path contains spaces, enclose the path in double quotes.

    -model=\MyProject\MyFolder\MyMasterTemplate
    

    or

    -model="\MyProject\MyFolder itp\some Master Template"
    

  • <master template file> Required. Enter the complete path and name of the file containing the Master Template. If there are spaces, enclose the entire path in double quotes.
  • <repository ini file> Required. Enter the complete path to the repository INI file. This file must contain the connection information to the KCM Repository Server, including host name and port. If the path includes spaces, enclose the whole path in double quotes.

The following parameters are optional:

  • -r=<revision number> Indicates the revision to be retrieved
  • -label=<label> Indicates the revision to be retrieved.

If -r and -label are both omitted, the [draft] revision is retrieved. If the Master Template does not have a [draft] revision, KCM Repository responds with an error.

Instead of a revision number, also the text "accepted" or "published" may be passed to the -r option.

Example -r=accepted. This option retrieves the [accepted] or [published] Master Template revision respectively, if present.

Master Templates and folders that are marked for deletion are disregarded when looking for the Master Template.

Return codes

The following table lists and describes error codes that can be returned by the Get Model API.

Error code

Description

5

The specified Master Template does not exist in the KCM Repository.

6

There is no revision with the given revision number for the specified Master Template.

7

The specified label does not exist in the KCM Repository.

8

There is no revision with the given label for the specified Master Template.

9

The Master Template specified does not have a [draft] revision.

10

The Master Template specified does not have an [accepted] revision.

11

Duplicate revisions have been found for the specified Master Template and revision.

12

The Master Template specified does not have a [published] revision.

21

The server configured is not a KCM Repository Server (check the KCM Repository Client configuration settings).

22

Failed to create the Master Template file.

23

Failed to write the Master Template file.

25

Call to server failed (check the KCM Repository Client log).

26

Failed to connect to the KCM Repository Server (check the KCM Repository Client configuration settings).

27

The set of parameters provided is incomplete.

28

Both a label and a revision number have been supplied.

31

Unspecified error.