how to animate spring compress and expand?
Are you looking to make a movie like clip of the spring with SW animator? If yes, you'll have to drive the height of the spring with a dimension that you can control in the animation. Consider placing the centerpoint of the circle profile sketch for the spring's wire diameter coincident with a plane. The plane you use needs to be one you created, offset from one of the standard planes. Then this offset value can be changed in the animation.
Welcome to SW forums Samuvel.
Check these links on Animating Spring
Animation check this one: Elliptical Spring here by Mike
How to Animate a Spring here by Ben
"How To Animate a Spring" (http://www.solidworks-apac.com/2009/12/21/how-to-animate-a-spring/)
Animating spring compression https://forum.solidworks.com/message/110556#110556
You might also find this post helpful for your future reference.
Retrieving data ...