ds-blue-logo
Preview  |  SOLIDWORKS USER FORUM
Use your SOLIDWORKS ID or 3DEXPERIENCE ID to log in.
MPMarco Pigoni29/01/2025

Hello,

in my code i override the mass of a part document and i set the mass value like this (and it works ok):

MassProperty2 massProp = _refDoc.Extension.CreateMassProperty2(); var OvProp = (MassPropertyOverrideOptions)massProp.GetOverrideOptions(); OvProp.OverrideMass = true; OvProp.SetOverrideMassValue(12); massProp.SetOverrideOptions(OvProp, (int)swInConfigurationOpts_e.swAllConfiguration, null);