Class Units
- Namespace
- Hymma.Solidworks.Extensions
- Assembly
- Hymma.Solidworks.Extensions.dll
helpers for unit conversion and calculations
public static class Units
- Inheritance
-
Units
- Inherited Members
Methods
ConvertLength(double, swLengthUnit_e)
changes the unit of length from default in solidworks (meter) to the one specified
public static double ConvertLength(double length, swLengthUnit_e newUnit)
Parameters
lengthdoublethe length to change the unit of
newUnitswLengthUnit_ethe unit required to change the length to SolidWorks.Interop.swconst.swLengthUnit_e
<pre><code class="lang-csharp">ModelDoc2.LengthUnit;</code></pre> </example>
Returns
- double
length in new unit
ConvertLength(double, string)
changes the unit of length from (meter) to the one specified
public static double ConvertLength(double length, string newUnit)
Parameters
lengthdoublethe length to change the unit of
newUnitstringthe unit required to change the length to
- use mm for
- use cm for
- use m for
- use in for
- use ft for
- use ft-in for
- use angstrom for
- use nm for
- use micro-m for
- use mil for
- use uin for