Based on the screen shot, I can't tell if your callout is in Model Space or on the Layout. Either way, natural function of Fields would work without the overhead of a Lisp routine.
If the callout is on the Layout tab, then easy enough just to place the block (with attribute) or text (mtext or dtext) onto the Layout and then associate the Field by Object, selecting the Viewport and assigning the Scale.
If the callout is in model space, then follow the same steps above, but then use the CHSPACE command to shift it over into model space. The link below covers this process in reverse, but will work either way.
Regens and other actions will update the Field when the scale of the Viewport changes. Those settings can be found in Options/ User Preferences / Field Update Settings
https://forums.autodesk.com/t5/autocad-forum/tagging-model-objects-in-layout/td-p/4840959
Please feel free to clarify the question if this is amiss.