This has been asked a few years ago and the basic answer was that it is not possible. You can certainly use the mass properties (volume, etc) to find how many would fit in a stacked master carton, but I don't know how you could account for lost space caused by tilted boxes. It becomes even worse if you are just putting odd-shaped parts into the carton.
The only way I know of is to export your Solidworks part & take it into Blender which is free modelling software. You'd need to read up on some tutorials but I believe it can be done by makeing your part a particle & dropping them into a container.