Units Object

Offers functions concerning the units of the current project.

Methods for Geometric Units

Geometry ( enum gUnit )

Sets the unit of lengths.

 

gUnit may have the following settings:

"m"

Meter

"cm"

Centimeter

"mm"

Millimeter

"um"

Micrometer

"nm"

Nanometer

"ft"

Feet

"in"

Inch

"mil"

A Thousandth Inch

 

GetGeometryUnit enum gUnit

Returns the unit of length of the current project.

 

GetGeometryUnitToSI double

Returns the factor to convert a geometry value measured in units of the current project into the units.

-> a(SI Unit) = factor * b(project Unit)

 

GetGeometrySIToUnit double

Returns the factor to convert a geometry value in SI units into the units defined in the current project.

-> a(project Unit) = factor * b(SI Unit)

Methods for Time Units

Time ( enum tUnit )

Sets the unit of time.

 

tUnit may have the following settings:

"fs"

Femtosecond

10 -15s

"ps"

Picosecond

10 -12s

"ns"

Nanosecond

10 -9 s

"us"

Microsecond

10 -6 s

"ms"

Millisecond

10 -3 s

"s"

Second

1 s 

 

GetTimeUnit enum tUnit

Returns the unit of time of the current project.

 

GetTimeUnitToSI double

Returns the factor to convert a time value measured in units of the current project into SI units.

-> a(SI Unit) = factor * b(project Unit)

 

GetTimeSIToUnit double

Returns the factor to convert a time value in SI units into the units defined in the current project.

-> a(project Unit) = factor * b(SI Unit)

Methods for Frequency Units

Frequency ( enum fUnit )

Sets the unit of frequency.

 

fUnit may have the following settings:

"Hz"

Herz

1 Hz 

"KHz"

Kiloherz

10 3 Hz

"MHz"

Megaherz

10 6 Hz

"Ghz"

Gigaherz

10 9 Hz

"THz"

Terraherz

10 12 Hz

"PHz"

Pentaherz

10 15 Hz

 

GetFrequencyUnit enum fUnit

Returns the unit of frequency of the current project.

 

GetFrequencyUnitToSI double

Returns the factor to convert a frequency value measured in units of the current project into SI units.

-> a(SI Unit) = factor * b(project Unit)

 

GetFrequencySIToUnit double

Returns the factor to convert a frequency value in SI units into the units defined in the current project.

-> a(project Unit) = factor * b(SI Unit)

Methods for Temperature Units

TemperatureUnit ( enum fUnit )

Sets the unit of temperature.

fUnit may have the following settings:

"celsius"

1 °C 

"kelvin"

-272.15 °C

"fahrenheit"

-17.22 °C

Example

With Units

     .Geometry ("mm")

     .Frequency ("ghz")

     .Time ("s")

     .TemperatureUnit ("kelvin")

End With