Usually I can solve this issue by re-applying a page setup and it'll fix itself, but how would I do this in code? Or even by a command sent to AutoCAD. Just changing the page setup in code does not get the two items to realign.
Clipboard01 is after I run my code to create the layout and viewport, and then apply a page setup.
Clipboard02 is after I manually re-apply a page setup.