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

eInvalidInput - PlotType.Layout

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
MarkSanchezSPEC
854 Views, 2 Replies

eInvalidInput - PlotType.Layout

I am using the following code, which has worked sucessfully to import page setups across multiple drawings:

 

Dim psv As PlotSettingsValidator = PlotSettingsValidator.Current

psv.SetPlotType(ps, Autodesk.AutoCAD.DatabaseServices.PlotType.Layout)     '<-- eInvalidInput

 

I have run into an issue recently, whereby the .SetPlotType line above fails with the following error:

 

?ex.Message

"eInvalidInput"

?ex.InnerException.ToString

Referenced object has a value of 'Nothing'.

 

After investigating this by opening the problem drawings, I found that though the current tab was set to a layout (CTAB = "Layout1"), the one and only viewport in the layout was "active".  If you view my attachment, you can visually see the condition I am describing. 

 

Thi smakes sense, sicne the viewport is acrive, the Layout cannot be accessed (i.e. Nothing).

Is there a setvar I can use to check for this condition or is there a way to de-activate the viewport and set the focus back to paper space?

 

TIA

 

2 REPLIES 2
Message 2 of 3
fieldguy
in reply to: MarkSanchezSPEC
Message 3 of 3

I posted this to the regular AutoCAD group and got an answer:My Other Post

 

The answer is to check the value of the CVPORT setvar.  If equal to 1, then no viewports are active.

Kudos to CoJonez!

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