Two years ago I had already asked this question but the solution was quite simple because I had a form very close to revolution. This is no longer the case today!!
If we disregard your conenu, can the proposed methods allow you to determine only the interior volume of your container?
If so, once you know the volume of your container, simply subtract the volume of the content that you easily obtain through Tools/Mass Properties and selecting all the contained elements.
To know what your expectation is: to have the volume of a click (difficult at first glance) or if you can afford to manually do a simple subtraction (Volume of the container - Volume of the content)
This is the eternal problem of ALL CAD software...
it's not for lack of reminding AXEMBLE of the problem two or three times a year for several years but no solution in sight.
In my field we have to put many packages, special machines and complex assemblies in water. as far as handling is concerned, it is the best to have the overall weight and the position of the center of gravity. on the other hand, when you go into immersion, it just becomes hell to have an apparent weight in the water and a center of thrust...
Whoever will be able to put into code form the very simple formula of this M. Archimedes, I await him like the messiah!
In short, that was the complaining part! In practice, well, I type a large Excel matrix with the weights of the parts (or sub-assembly) and their volume (= volume of material + interior volume) you can then calculate the center of thrust of the hull and other... Basically, it's on the calculation of volumes that the question annoys! especially closed volumes. The best thing to do is to make a room dedicated to each volume and to assign it the properties of the air or other... It's often very long and boring...
Well after testing or trying to test your different solutions, I conclude that there is no miracle function but with the "A" solution of .pl, we can get there with just an addition.