Interesting issue. I too got an error with that code. I was able to get rid of that error by using a different method (GetPriciseStringFromValue vs GetStringFromValue). I don't know why that would make a difference though.
Dim oUOM As Inventor.UnitsOfMeasure = ThisDoc.Document.UnitsOfMeasure
Logger.Info("1: " & oUOM.GetPreciseStringFromValue(1, UnitsTypeEnum.kInchLengthUnits).Split()(1))
oUOM = ThisApplication.UnitsOfMeasure
Logger.Info("2: " & oUOM.GetPreciseStringFromValue(1, UnitsTypeEnum.kInchLengthUnits).Split()(1))
I do see that there is a method called "GetLocaleCorrectedExpression", but the documentation for it sort of suggests that it may only correct decimal place character changes. It does not mention units string abbreviation conversion. The only 'localization' related tool I have seen within iLogic or Inventor API is a tool I found maybe a year ago, but it seems to be specific to the names of ModelStates, not just general verbiage.
Dim oMSName As String = "Master"
Dim oMSNUtils As New Autodesk.iLogic.Runtime.ModelStateNameUtils
Dim sLocalizedName As String = oMSNUtils.GetLocalizedName(oMSName)
MsgBox("The 'Localized' version of " & oMSName & " is: " & sLocalizedName, vbInformation, "iLogic")
Wesley Crihfield

(Not an Autodesk Employee)