For the life of me I can not figure out why this isn't working. My code runs without erros but the units will not change. I haven't coded in awhile so maybe I have something goofy going on. This is just a chunk of the over all code, the rest does exactly what it is supposed too just this silently fails to do what it should. Any thoughts or ideas?
' Set units to Feet Dim swExt As SldWorks.ModelDocExtension Set swExt = swModel.Extension ' 1 = swUnitsLinear ' 0 = Scope (this document) ' 2 = swUnitFeet swExt.SetUserPreferenceInteger 1, 0, 2 swModel.ForceRebuild3 True