I got a few hits on this one. I had the correct idea, just didn't know
the method.
Basically define the number of coils in the relation then set it up so
that pitch equals the defined length divided by the number of coils. If
this value ever equals less than the wire diameter then set the pitch
equal to the wire diameter and the length to the product of the wire
diameter and number of coils.
Following is probably the best example given:
Assume D0 is the length of the spring that will be varied, D5 is the
wire diameter, D2 is the pitch, and you require 5 coils: I would create
a parameter called COILS and set it to the number of coils you want. The
following relations will change the pitch to follow the length and not
allow the spring to be shorter than fully compressed:
IF D0 < (D5*COILS)
D0=D5*COILS
D2=D5
ELSE
D2=D0/COILS
ENDIF
Thanks to all who responded. This gives me a good starting point.
Phil