Text Alignment in detail drawing's

Hi is there any script for text alignment in detail drawing’s with reference line or scope boxes. Please help me out, I am struggling with 2D annotation.

Thanks.