Auto make dimensions of walls which are not on the grids

I think some probably did it before,but I found it doesn’t relate to the grids,it just make dimensions of every door and windows of the walls.Here’s link
https://forum.dynamobim.com/t/auto-dimension-from-walls/26631?u=mavs013

And I also have watched videos on the youtube which teach how to do it,but it’s about columns and with one axis on X and Y direction.Here’s the link
https://youtu.be/Ip8Icu2Hpso

Here’s what it looks like:
自动标注不在轴线上的墙体

And I also make a video.
https://youtu.be/zU6PpikekSc

The only one difficult step is sloved by one custom node from Clockwork,thanks for the author,I really appreciate that.
https://forum.dynamobim.com/t/how-can-i-get-index-of-time-from-these-complex-lists/86915?u=mavs013