Script to trigger the animation

Hello. 

Is it possible to trigger the animation through a script? I was looking to start the animation without pressing the play button manually. I couldn't find a solution for this on youtube. Any help would be great.

SolidworksApi/macros
Answers 6
PB
PB 2021-03-26 Best Answer

What do you mean by 'the animation'?

RR
RR 2021-03-26

Yes, I was thinking if there was a way that the macro would run as and when the data input for the motors used are updated. But I couldn't find anything similar to this.

Is it possible though?

AL
AL 2021-03-26

Well, how do you expect it to run..? The program can't exactly guess for you when to run and when not to

RR
RR 2021-03-26

Yes Alex I did, But then I would have to run the recorded macro whenever I need it.  

AL
AL 2021-03-26

I'm no macro expert, but have you tried simply recording the action of ''starting the animation'', using the built-in feature?

2019 SOLIDWORKS Help - Recording and Playing Macros 

RR
RR 2021-03-26

I had done a motion analysis of an assembly, I had used few linear motors for its motion. The inputs to the motor are given through a spreadsheet and that data would be updated on regular intervals. So I was thinking if there is a possibility to trigger (start) the animation via a script as and when the inputs are updated. So that the linear motion would change for each data set.