An API is available to retrieve a model from the ITP/MDK Repository without a deploy. It will store the model in a folder specified by the requesting client.
getmodel.exe -model=<model name> -file=<model file>
-cfg=<repository ini file> [<options>]
The above code is one line.
The required parameters are:
<model name> is the name (path) of the model to be retrieved. It is the full path of its model document in the ITP/MDK Repository i.e., project\folder\model document.
Example
-model=\MyProject\MyFolder\MyModeldocument
or
-model="\MyProject\MyFolder itp\some model document"
The quotes are necessary because of the spaces in the model's name and path.
<model file> is the name of the file in which the model will be stored. Use double quotes if there is a space in the file's name or path.
The model file name must be specified with an absolute path. Only when deploying for ITP/Workstation, the model file name may be a relative path. In that case it is resolved with respect to the Models folder as specified in the active file ITP configuration of ITP/Workstation.
<repository ini file> is the path to the repository ini file.
The ini file is needed for the connection to the ITP/MDK Repository Server.
Choose one of the options:
-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 [current] revision is retrieved. If the model doesn't have a [current] revision the ITP/MDK Repository will respond with an error.
Instead of a revision number, also the text "accepted" or "published" may be passed to the -r option (e.g., -r=accepted). This will retrieve the [accepted] or [published] model revision respectively, if present.
Documents and folders that are marked for deletion are disregarded when looking for the model.