Dimensions between elements and grids

hi, im sry, im new at dynamo and been looking through a lot of info about auto dimension with dynamo.
im trying to do a rutine that helps me dimension between grids and diferent elements like structural framing and generic models.

any thoughts? is this posible?

thanks