Navigation: Scripting Reference Manual > Functions & Subroutines > GetUnitConvFactor

 

GetUnitConvFactor

 

Contact Us: fredsupport@photonengr.com

 

Description

This function returns the scale factor required to convert between two spatial units.

 

Syntax

dScale = GetUnitConvFactor( sFrom, sTo )

 

Parameters

dScale (Double)

Returned scale factor for converting from spatial units sFrom into spatial units sTo.

 

sFrom As String

String argument indicating the starting spatial units.  Options are:

Angstrom, nanometer, micron, millimeter, centimeter, meter, kilometer, microinch, inch, foot, yard, mile

 

sTo As String

String argument indicating the desired spatial units.  The scale factor indicates the numerical scaling required to convert from units sFrom into units sTo.  String arguments are identical to those listed above for sFrom.

 

Example

The following example demonstrates how to retrieve a units conversion scale factor to convert from the current document units into meters.

 

 

Sub Main

          Dim unitsSF As Double

          unitsSF = GetUnitConvFactor( GetUnits(), "meter" )

          

          Print "Conversion scale factor to meters = " & unitsSF

End Sub

 

See Also

GetUnits

SetUnits

GetComment

SetComment

AddComment

Update

 

 

 

 

 

Copyright © Photon Engineering, LLC