Adding a temporary body to an assembly

Hello,

Does anybody have some insights on adding a temporary body to an assembly? During runtime, the body is created from the parts in the assembly and is stored in memory. Now I want to add it to the assemly using only the API. Any help would be greatly appreciated!

SolidworksApi macros