.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ed.SwitchToPaperSpace throw an eInvalidInput exception

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
FRFR1426
566 Views, 2 Replies

ed.SwitchToPaperSpace throw an eInvalidInput exception

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?

Maxence DELANNOY
Manager
Add-ins development for Autodesk software products
http://wiip.fr
2 REPLIES 2
Message 2 of 3
_gile
in reply to: FRFR1426

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.



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

Message 3 of 3
FRFR1426
in reply to: _gile

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.

Maxence DELANNOY
Manager
Add-ins development for Autodesk software products
http://wiip.fr

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost