Creating a variable dimension part

Hello,

I'm going around in circles on a subject, and I can't achieve what I want exactly.

I need to create a part, in this case a tube, that I could insert from the bookshelf into my assemblies and be able to select a diameter and a length.
The goal is to be able to insert several tubes of different diameter and length without redrawing them each time.

Do you know how I can do that?

The most relevant solution for the moment that I have found is to create a room with several configurations, but I can't change the length.

To put it simply, I need to do the same thing as the Toolbox tool with the screws. I choose a tube and then he offers me a diameter and a length.

Thanking you in advance,

Otherwise draw the part in the library, drag it to the desired location, make it virtual (right-click, make it virtual), then change the Ø and the length.
The virtual component is a virtual copy of the initial component (without any links)

Edit: And this avoids in the long run having a super heavy part with an infinity of configurations according to the different Ø and lg.
Here is only one configuration.

Hello,

The configuration publisher should meet your needs:
Configuration Publisher - 2022 - SOLIDWORKS Design Help

2 Likes

Hello,
I don't use Config Publisher but I'm not sure if you can enter a variable like the length without an upstream definition (list/family of parts). To be confirmed

Of course it is.
Example - Reference Data in a Number Order - 2021 - SOLIDWORKS Design Help

1 Like

Hello

Why not make a family of parts, with a constraint like a screw?
The part family is faster to design. If you prefer a configuration, you remove the part family, the configurations will remain.
Starting from a normal template

Hello,
I was more of a Configuration Publisher .
This allows you to define several tube diameters via a drop-down list while leaving the possibility of a " variable " length (completely free or between two limits).

3 Likes

Example of publisher configuration (solidworks 2022):


image
image

The basic principle is to build two configurations (with the specific dimensions of the configs), to launch the publisher in which you register the variables.
Validate the publisher.
Then run the part family table in Excel to make the configuration names a concatenation of the type:
" Tube " + $Diam be tube + $Lgtube
so that any new configuration created in an assembly is a new configuration in the part family.
In the example given the name of the configurations is:
=CONCAT("Tige-Filetee_8-8_M";TEXTE(B3;"00");"x";TEXTE(C3;"0000");"mm")

Tige_Filetee_Metrique_8-8_Brut - Copy.SLDPRT (171.5 KB)

2 Likes