I have a spring in a sub assembly that I created incontext that works totally fine in the sub assembly file, but when I use that assembly it stops working and the spring stay constant length.
I'm not entirely clear what behavior you are seeing. Are you putting the spring SLDPRT in the sub-assembly and the top level assembly or just in the sub-assembly? It sounds like the sub-assembly controls the spring length. Is the sub-assembly flexible in the top level assembly? I'm not sure if you can share your assembly and part or a simplified version. If not, then some screen shots and more detail would help.
How can I attach a file to a forum post?
Right click subassembly in feature tree, component properties then flexible. Maybe I read wrong, so check which configuration it is using for different lengths of spring.
Click Ctrl-Q (Force regen top level ass'y)
Retrieving data ...