Almost all SolidWorks API methods are using system units which are MKS (meter, kilogram, second). For example SketchManager::CreateLine, Face2::GetArea, MassProperty::Mass. In my opinion this consistency is very important allowing to eliminate a lot of potential problems. However in some cases you need to take care about the conversion. For example when your macro or program expects user to input the value. And user expects to input the value in the unit system he is working on. The most common way of solving this issue is introducing custom units conversion system where your macro reading current user preferences and manages the table of conversion factors. I'm going to introduce you to specific interface available in SolidWorks API which is dedicated to unit conversion. This is IUserUnit Interface Let's take a quick look. Interface can be accessed through the ISldWorks::GetUserUnit or IModelDoc2::GetUserUnit. Later one automatically reads model unit settings and assign them to interface while first one needs to be initiated with the unit system.
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim swUserUnits As SldWorks.UserUnit

Sub main()

    Set swApp = Application.SldWorks
    Set swModel = swApp.ActiveDoc

    'Get current model user units. All properties are read-only for the UserUnits obtained from IModelDoc2
    Set swUserUnits = swModel.GetUserUnit(swUserUnitsType_e.swLengthUnit)

    'Converts from current model unit to system value (meters). For example if current units are inches the result will be 0.0254
    Debug.Print swUserUnits.ConvertDoubleToSystemValue(1)

    'The same as previous but allowing to specify the unit short name. For example the following converts from 10mm to meters (result 0.01)
    Dim unitVal As Double
    swUserUnits.ConvertToSystemValue CStr("10mm"), unitVal
    Debug.Print unitVal

    'Get the conversion factor (If inches the result is 39.3700787401575)
    Debug.Print swUserUnits.GetConversionFactor()

    'Get the customisable user units
    Set swUserUnits = swApp.GetUserUnit(swUserUnitsType_e.swLengthUnit)

    'Set the current unit system to be CM
    swUserUnits.SpecificUnitType = swLengthUnit_e.swCM

    'Convert 5 cm to meters (0.05)
    Debug.Print swUserUnits.ConvertDoubleToSystemValue(5)

End Sub
It is also possible to change the digits, rounding options and padding for user units obtained from IModelDoc2 interface. You can also manage angular units in the same way as regular just specify ::GetUserUnit(swUserUnitsType_e.swAngleUnit)