When I'm calling ed.SwitchToPaperSpace in my command, I receive a RuntimeException with the code eInvalidInput. If I try with Application.SetSystemVariable("TILEMODE", 0), AutoCAD crash (AccessViolationException). What can cause this behavior?
Solved! Go to Solution.
Solved by FRFR1426. Go to Solution.
Hi,
Can you tell more about the context.
AFAIK, TILEMODE sysvar (or Database.TileMode) refers to the model tab (switch from or to the model tab to a layout one) and Editor.SwitchToPaperSpace() method is to be used in a paper space tab to switch from an active floating viewport to the paper space viewport.
Hi Gilles,
You're right about SwitchToPaperSpace. In fact I'm creating some floating viewport and I need to call SetSystemVariable("TILEMODE", 0) before the creation of the viewports. If I call it after, AutoCAD crashes.