Parametrization of a simple assembly in CATIA v5 from scratch

This is a quite simple application that I present to my students to learn how to model and parametrize an assembly in two configurations:

https://youtu.be/y9eh8lZ_Bu0

And this is made using a Rule:

https://youtu.be/7EMsdPg7cXk?si=KV6IoCnFn8nRInl-