This Code is inspired from the LinkedIn post (https://www.linkedin.com/feed/update/urn:li:activity:7143468772987658240/)
I Dont know how they developed the code, but I seen a youtube video of NX Synchronous Modeling (https://www.youtube.com/watch?v=97XGafpranM) to calculate the Internal volume od component.
Base on concept of NX Synchronous Modeling. I developed this code.
Calculate fluid volume in Listimg window (like below Image)
Note- This code developed to calculate only the Pipes in Assembly with only one inlet and one outlet in any direction. It will fail to calculate Pipes with multiple outlets or inlets.