How to connect the top elevation of the wall with the height of the beam bottom?

Hi all
I have a question about how to connect the top elevation of the wall with the height of the beam bottom?

If you know the height of the beam, you could use something like this:

If your beam height has a parameter, you could do something like this:

Hope this helps, else let me know.

thank you !

I made some optimization, making it more in line with my project, now I have a few problems, when I change the wall at the top of the migration, it has to do with the size of the beam of the same location, it makes me can’t batch change all the height of the wall, because each beam size is different.
And I don’t want a choice, I want to be able to select all the family type of walls and beams to align them automatically

Like I said before