The reason your bounding box is likely huge is that most CAD software default to the global origin when calculating the absolute extent, rather than treating your selected parts as a seperate system. To get the tighter envelope you want, you need to verify how the feature handles the calculation reference. Most tools give you a choice: calculate the full document bounds, or calculate the bounds only for the selected bodies or components. Make sure you've selected the individual parts before running the feature so the software only measures the total span of that specific group. Regarding adjusting the box dimensions, look closely for a 'margin' or 'tolerance' input field when you define the bounding box. This setting is what allows you to dynamically shrink or grow the box after it's been generated. If the parts are spaced out but you want the box tighter, you manually reduce that tolerance value. Conversely, if you know your printer needs clearance, you increase it. This margin input is your primary control for how tight the fit is.
It sounds like you're trying to automate the cleanup process, and that's a smart move for complex assemblies. While features like a measure value tool are useful for pulling dimensions out into a text variable, they genrally don't solve the initial geometric fitting issue. You are essentially asking the software to perform a bounding box operation on a subset of geometry, and you just need to confirm the operation is targeting the correct selection set and applying the right margin.
For 3D printing, remember that the final bounding box should be at least slightly larger than your calculated box to account for supports and necessery print clearances. If you are exporting this to slicers, ussually a small buffer beyond the tight bounding box is helpful so the printer doesn't run right up against the modeled surface.
I've had plenty of projects where the initial bounds were wildly inaccurate beacuse the feature was set to the entire assembly instead of the grouped components. Check your feature options for that selection setting; that should give you the tight envelope you're looking for.