We don't use paperspace, so we have 4 borders of varying sizes to accommodate scaled drawings.
I have a routine that currently checks the dimscale and inserts a new attributed title block and border to replace the existing one. This all works great provided the dimscale is correct. If it's not things don't go as planned.
Seems to me I need to...
Check the current dimstyle
If it is annotative, make it X dimstyle. ;;easy enough
Find the length of the bottom segment of the polyline border. ;;I've found examples, seems doable.
If dimscale isn't equal to the segment length, make it so. Now...it's not really equal but you get the point. The line would be X long with Y dimscale and Z long with AA dimscale ;;not a clue on how to accomplish this.
Maybe make a list of the standard dimscales and a list of lengths for the bottom segment line to check against. I don't know...I feel like I'm guessing.