Part units are really bugging me...

Hello,

I have written some code to change units of parts in the assembly..

code:

        'APPLYING UNITS DEPENDING UPON SELECTION

        '*****************************************

        If Me.ComboUnit.Text = "METRIC" Then

            boolstatus = swmodeldoc.Extension.SetUserPreferenceInteger(swUserPreferenceIntegerValue_e.swUnitSystem, 0, swUnitSystem_e.swUnitSystem_MMGS)

        Else

            boolstatus = swmodeldoc.Extension.SetUserPreferenceInteger(swUserPreferenceIntegerValue_e.swUnitSystem, 0, swUnitSystem_e.swUnitSystem_IPS)

        End If

But while opening the file it shows some bugs...such as parts unit has been converted to Metric but while double click on the part the dimensions are still in Inches...

How this will be possible.

see the attach picture for ur reference.

SolidworksApi macros