API Documentation > CorelDRAW > 2025-v26 > CorelScriptTools > ICorelScriptTools
CorelScriptTools.LengthConvert method
Length Convert
Syntax:
Function LengthConvert(ByVal FromUnit As Long, ByVal ToUnit As Long, ByVal Value As Double) As Double
Parameters:
Name Type Description
FromUnit
Long
ToUnit
Long
Value
Double
Remarks:
The LengthConvert method converts a number from one length measurement to another. Tenths of a micron is the basic unit of measurement in Corel applications such as CorelDRAW and Corel VENTURA.
Examples:
The following VBA example converts one inch to tenths of a micron in CorelDRAW. The variable x_microns equals 254,000.
x_microns = LENGTHCONVERT(1, 7, 1)