Do you need to show animating cylinder i.e. increasing or decreasing height of a cylinder. Then here is a quick and easy way of doing that. Please note that you can use any unit system (metric or inches) for this tutorial.
1. Start a new part and save it without creating any features or sketch in it. I would call this part as Dummy part.
2. Start a new assembly and save it as Animating Cylinder.
3. Insert the part into this new assembly using Insert Component option (Insert > Component > Existing Part/Assembly)
4. Browse to the part location and drop the part anywhere in the assembly or simply click on OK.
5. If you notice a (f) part name in the assembly in front of manager tree, then right click (RMB) on it and select float from the list. The (f) indicates that part is fixed which means it can make any movement. But as we need to move the part, we need to make it free. Hence we selected float. Now the part can move in any direction.
6. The (-) in front of part name indicates that part is free to move/rotate anywhere.
7. Now select Front planes of the assembly and of the dummy part and add a coincident mate.
8. Select Right planes of the assembly and of the dummy part and add a coincident mate.
9. Add a distance mate of any value (say 10 mm) between the Top planes of the assembly and of the dummy part. You may have to set the position of Top plane of Dummy part as required. Use Flip dimension to set to the position.
10. Start a new part within the assembly (i.e. in context modeling). With the options coming up in new versions, you can save the file internally in the assembly itself. Insert > Component > New part.
11. Click or select Assembly Top plane to start the sketching for new part. You’ll notice a change in the pointer.
12. Now you’ll be the part edit mode and further in the sketching mode. Create a circle with center at the origin and of any diameter.
13. If you feel/require, you can dimension the circle. As a best practice and good habit, it’s always better to use a fully defined sketch. I have given a diameter of 80 mm.
14. Now click on Extrude Boss/Base or Insert > Boss/Base > Extrude.
15. You’ll a see a preview of the extruded cylinder. Click on Direction 1 and then select “Up to Surface” from the drop down list for extrude end condition.
16. Now click in the Face/Plane selection box to define the face/plane for the extrude condition.
17. Expand the feature manager tree by clicking on the plus sign next to assembly name.
18. From the list, select Top plane of the Dummy part.
19. You’ll see the Top plane (Dummy part) in the Face/Plane box of extrude command. Click OK to exit the command.
20. Click on Edit component to exit part editing and move back to assembly editing.
21. This is how the screen will look like.
22. Now switch to Motion Study.
23. Drag the time to any time level/distance. I have set it to 6 sec.
24. Expand the Mate folder by clicking on the plus sign.
25. From the list, double click on Distance mate.
26. You’ll see dimension edit dialog box. Change the value to any value. I have set it to 50mm.
27. Click OK to save the current value and exit the dialog box.
28. You’ll now see the time bar (blue color) in front of Distance mate indicating the change in mate dimension.
29. Click on calculate. And then once calculation is over, you can see the cylinder growing. Use play button to play the animation.
30. You can set Playback mode to Reciprocate to see cylinder increasing and decreasing in size.