how do I set a minimum and maximum dimention on say a line or a part and link it to another side of the part for them it to vary continuously

i want to set a max and min hieght if the post.
then for the bigger diameter to change with in certain range in the height variation
the slot to also change accordingly
i used configuration but it is only limited to the number you make