Viewport scale updates graphic scale

Graphic scale and viewport scale are in sync.

Ever finished plotting only to realize you forgot to update the graphic scale to match the viewport scale? That little spark of frustration turned into a common sense solution. When the viewport scale changes now the numbers on the graphic scale update.

How did I do that? I paired the fields in the block attributes of the graphic scale with the viewport. I hacked together expressions to do the math and formatting.

Making it portable. The graphic scale block and the viewport must exist together in the same layout so I made a block containing the two. Now this little miracle can be inserted into any layout in AutoCAD. You can copy the layout and the graphic scale and viewport work together in the new layout.