Table of Contents

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

length double

the length to change the unit of

newUnit swLengthUnit_e

the 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

length double

the length to change the unit of

newUnit string

the 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

Returns

double