Home » How to make a subassembly flexible in SolidWorks?

What is it?


As mentioned in a previous article, allowing for motion of parts is one of the only reasons an assembly may not be fully constrained. The motion can be carried though to the next assembly. This can be done for a variety of reasons. A piece of equipment can be shown in multiple positions, either to show range of motion or specific positioning for transport. Instead of creating multiple versions of the same assembly, they can all be in a single file with multiple configurations.

Setting a Subassembly as Flexible

Right click on the subassembly and select “properties”. From the new window, select Flexible from the “Solve as” section. Refer to the example below.

What Constraints apply

Apply any constraints to mostly constrain the component(s). How parts are constrained will depend on the motion that is required. Be careful not to constrain geometry which impacts the desired motion.

To control motion, one of the variable mates will be required. This could be: a path, linear coupler, limit distance or limit angle mate from the “Advanced Mates” section. Any of the mates from the mechanical section can also be used.

Example 1

Download the hydraulic cylinder from grabcad.com here.


After importing the file, open the subassembly “Hydraulikzylinder 100_56_320_1046169_1”. Demote “ENG-007990” to the assembly of the cylinder body, and fix its position.

At this point, only two subassemblies exist, the cylinder and the rod. Set both of them to “Float” and fully constrain the body of the cylinder.

Use a concentric constraint between the rod and cylinder body. Then mate the rod to the desired orientation.

Drawings of cylinders will typically indicate the bore Ø, rod Ø, collapsed height and stroke. The naming of this file indicates the bore, rod and stroke. The collapsed height can be determined, as the internals have been included. The available travel is 397mm and the piston is 77mm wide, therefore the full length can be used. Create a limit mate and use 738mm and 1058mm to define the range of motion.

Without the use of a design table, only the starting distance of the mate can be controlled. As an alternative, a distance mate will be used to control the length for specific configurations.

Rename default to “FLEXIBLE” and add two new derived configurations: “COLLAPSED” and “EXTENDED”. Suppress LimitDistance1, and apply a distance mate between the same two planes. Set the value to 738mm and complete the mate. Once applied, select both the limit distance mate and the distance mate, then right click and select “Configure Feature”. Set suppression of the mates and D1 as shown below. If D1 does not appear, click the drop down arrow and select D1.

In a Drawing

The collapsed and extended configurations can be used to create an “Alternate position view”. Use collapsed as the configuration for the view, then select “Alternate Position View”. To define the alternate position, select “Existing Configuration” and choose extended from the list.

Inserting Subassemblies

Begin a new assembly, place the hydraulic cylinder and constrain the body to the Z-axis. Constrain to the front and top planes as desired.

Create an axis 738mm from the right plane and 90mm from the top plane. Use it to constrain the pinion, from the rack and pinion tutorial. Increase the length of the rack to 400mm. Once the pinion is in place, set the one side of the rack flush with the plane at the connection point of the rod. Now that both are in position, both of the assemblies will be set to flexible. Right click on one of the assemblies and select “Properties”. Select Flexible from “Solve as”. Do the same for the other assembly.

If the mates have been applied correctly, the rack and pinion will move when the stroke of the cylinder is changed.

Configurations can be added to include specific positions of the cylinder. Where the position is fixed, the cylinder can be set back to rigid.


Any change to the position will result in a prompt to rebuild the assembly. In PDM this results in a warning that “The file is not rebuilt” when trying to check in the assembly.

Patterning a flexible subassembly does not work as anticipated. One rod can be repositioned while the other remains as it was. Ensure both ends are constrained to the desired geometry.

Although the assembly is technically constrained properly, there are situations where a component can be forced into an incorrect position. In the case below, rotating the bucket too far clockwise results in a compatible mate condition for the cylinder. The image on the left shows where the bucket should stop. If rotation continues, the image on the right becomes the new starting position for rotation. At this point rotation can continue until the cylinder is fully extended.

Additional mates, applied to the cylinder, will most likely result in an “Over-defined” error. The assembly can be left as is, however to mitigate this issue a limit angle mate can be applied to the bucket. Use the cylinder positions, when extended and retracted, to determine the angular range for the bucket.

The model can be found here, however everything is contained within a single assembly. For full range of motion of the bucket, the cylinder needs to be between 2150mm and 3500mm. At a collapsed height of 2150mm the rod extends beyond the body of the cylinder.