To switch between Paper Space and Model Space, AutoCAD expects you to toggle the value of TILEMODE, either by entering TILEMODE at the command line and changing its value (0=OFF, 1=ON), or clicking on the Model/Layout tabs at the bottom of the drawing editor.
The downside to both of these methods is that AutoCAD does nothing to handle Linetype Scaling.
Why is resetting LTSCALE important?
If you toggle TILEMODE without accounting for LTSCALE, either your linetypes will fail to display in Paper Space because they're too large, or they'll be far too small and generate many times more segments than are needed for Model Space. This can drastically impact performance by using up a significant amount of your resources just to hold the display list.
When PSLTSCALE is 1 (On), Paper Space Viewports automatically apply the inverse of the Viewport Zoom scale factor (times the LTSCALE) as the linetype scale for entities in that Viewport.
You can create a menu button for changing Paper/Model Space that not only toggles TILEMODE but resets the LTSCALE and PSLTSCALE beforehand. Your AutoLISP code for this button might look something like this:
(if (zerop (getvar "TILEMODE"))This code snippet checks the current value of TILEMODE. If it's 0 (zero) it means you're currently in Paper Space so it prompts you for a target LTSCALE value, then toggles to Model Space. If TILEMODE is not 0 (zero) you're in Model Space, so it sets LTSCALE to 1, enables Paper Space linetype scaling, then toggles to Paper Space.
(setvar "LTSCALE" (getint "\nLTSCALE: "))
(setvar "TILEMODE" 1))
(setvar "LTSCALE" 1)
(setvar "PSLTSCALE" 1)
(setvar "TILEMODE" 0)))
(You could add additional program code to try to divine the target LTSCALE for you rather than stopping to prompt you, but that's more than I want to get into in this post.)