How can I apply variable input data (time dependent forces derived from C code) directly to a simulation from the code?

I have a code that generates many resultant time dependent forces, which will then be applied to my solidworks assembly. Instead of manually entering in each force, is there a way to interface solidworks simulation with a code in C, so that when I run my program, I can immediately see the resultant stresses in my solidworks part?

Additionally, I have another code that outputs the time-dependent position/configuration of the assembly. Is there a way to interface solidworks animations with this code?

Thank you for your help!

SolidworksSimulation