Spring Compression is not kinematics, it's Dynamics. CATIA cannot do it, although there are a couple of CAA applications that will - one from LMS and one from MSC.
There is a work-around for CATIA that involves parametrics and assembly constraints, instead of Kinematics. Essentially, you create some Assembly Level parameters, associate them to your constraints as well as to your spring, and change the values of the parameters. As your assembly updates, so will your spring.