Adjust definition scale

Hello, I’m looking for a script, I need to adjust the definition scale of the subcomponents of my box, I want something automatic, without having to enter the component and adjust the scale one by one.