Automatic structure dimension

does anyone have a dynamo routine that makes auto dimension for structural elements, like columns, beams and slabs like this imagem please?

Best to read over the post linked here, specifically item #7.

This is doable, and in fact there are a dozen such sources thereof. Search the forum for such examples and take a stab at it yourself and see where you get.