Variables in extrusion

When extruding a sketch, can the length "D1" be expressed as a link to variable defined as an equation, in the same way that dimensions can?

SolidworksParts And Features