Model Ball Screw with different length

Hello everyone,
I'm trying to redo my design of a CNC milling machine that I did a few years ago using another software. This time I'm doing it in SOLIDWORKS and I'm trying to make it like an easy drag and drop process for adding parts such as ball screws, linear guides, etc. (Like a library kind of way that you just pick from the list)
I have designed all different types of available ball screws including size, lead, support types,... using configurations. However, the problem is the length of the shaft. The length can be anything from 300mm to 3000mm depending on how big I want the machine. I've been trying different methods but I haven't found any solutions yet.

What I have tried so far is:

1. Using a global variable as the length of the shaft and changing it to my need after adding the part into the assembly. The problem is that when I change the global variable (say for axis X), it changes the length of all the ball screws in all other axes (Y & Z) as well. Is there any way to do this without having to save the part with a new name and using that for different instances?

2. My ideal method is something like the configuration publisher thing which would ask me the length, size, lead, etc whenever I add an instance of the part into the assembly. But I haven't yet found a way to do this.

I appreciate any help you can provide. Thank you all in advance,
Mahdi

Accepted answer

Okay, so I was searching and trying all kinds of methods and I finally have my answer xD
The solution that I chose to go with was to make as many configuration as I need for all the dimensions except for the length. For the length I made the part a flexible one and through that i could easily change the dimension and adapt it to my requirements whenever I add the part to an assembly.
Hope this helps others as well :)


2 Other answer

I recommend that you save the item you want to modify in the program library, then insert it according to the desired dimensions.

https://blogs.solidworks.com/tech/2019/09/solidworks-tech-tip-adding-your-design-library-to-a-pdm-vault.html

Thank you very much S.C.
However, That link solution is about using off-the-shelf components. My problem on the other hand is more of a cut-to-length kind of problem.