Documentation Center

Understanding how version numbers behave

The Document Object class uses a string that allows the use of keywords, branch separators and other combinations. The allowed values for the version string parameter are described in this section.

The following table indicates the allowed values for the version string parameter.
Regular Expression or Case Insensitive KeywordDescriptionExample
[1-9][0-9]*(\.[1-9][0-9]*\.[1-9][0-9]*)*An exact version number with option to support branches.
  • 3, 7, 118,... so a simple integer number;
  • 3.1.2, 4.5.18,... so a branch version;
  • 2.3.4.5.6, 3.2.2.2.2.4.4,... so more complicated branch versions.
new ([1-9][0-9]*\.[1-9][0-9](\.[1-9][0-9]*\.[1-9][0-9]*)*)?To indicate a new version. Can be followed by a branch number for a new version on that branch.
  • new so a new version on the main branch;
  • new 4.1 so a new version on the 1st branch of version 4.
latest ([1-9][0-9]*\.[1-9][0-9](\.[1-9][0-9]*\.[1-9][0-9]*)*)?To indicate the latest version. Can be followed by a branch number for the latest version on that branch.
  • latest so the latest version on the main branch;
  • latest 4.2 so the latest version on the 2nd branch of version 4.
latestafterfilter ([1-9][0-9]*\.[1-9][0-9](\.[1-9][0-9]*\.[1-9][0-9]*)*)?To indicate the latest version that is available after filtering. Can be followed by a branch number. When followed by a branch number and there is no object that matches the filter on the given branch, then an ancestor version is returned (when available).
  • latestafterfilter so the latest version available on the main branch after filtering;
  • latestafterfilter 4.3 so the latest version available after filtering on the 3rd branch of version 4 or on the main version.
latestonbranchafterfilter [1-9][0-9]*\.[1-9][0-9](\.[1-9][0-9]*\.[1-9][0-9]*)*To indicate the latest version on a branch that is available after filtering. Has to be followed by a branch number. When there is no object that matches the filter on the given branch, nothing is returned
  • latestonbranchafterfilter 4.5 so the latest version available after filtering on the 5th branch of version 4.
emptyTo indicate no version number at all. Used for example to delete a logical object.
  • ""