API Documentation > CorelDRAW > 2025-v26 > CorelScriptTools > ICorelScriptTools
CorelScriptTools.GetVersion method
Gets Version
Syntax:
Function GetVersion(ByVal Option As Long) As Long
Parameters:
Name Type Description
Option
Long
Remarks:
The GetVersion method returns the system or Corel SCRIPT version numbers. For a script, executable, DLL, or Corel add-on created with Corel SCRIPT to run, the major version numbers for Corel SCRIPT (the compiler) and the Corel SCRIPT run-time interpreter (SCINTxx.DLL) must be the same or else an error occurs. A difference in the minor version numbers does not cause an error.
Examples:
In the following code example, the first line passes the Corel SCRIPT version number to CS_version. A message box is then used to display the first two digits in CS_version by using the LEFT function. Next, a message box is used to display the first two digits in CS_version by using the RIGHT function.
CS_version = GETVERSION(10) MESSAGE "Corel SCRIPT major version number " & LEFT (CS_version, 2) MESSAGE "Corel SCRIPT minor version number " & RIGHT (CS_version, 2)