.NET

Reply
Valued Contributor
spanqy
Posts: 90
Registered: ‎11-13-2006
Message 1 of 3 (290 Views)
Accepted Solution

eInvalidInput - PlotType.Layout

290 Views, 2 Replies
10-26-2012 08:40 AM

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

 

Valued Mentor
fieldguy
Posts: 366
Registered: ‎03-31-2005
Message 2 of 3 (265 Views)

Re: eInvalidInput - PlotType.Layout

10-26-2012 03:25 PM in reply to: spanqy
Valued Contributor
spanqy
Posts: 90
Registered: ‎11-13-2006
Message 3 of 3 (264 Views)

Re: eInvalidInput - PlotType.Layout

10-26-2012 03:27 PM in reply to: spanqy

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!

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community