AutoCAD 2010/2011/2012

AutoCAD 2010/2011/2012

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

How to determine if any Viewports are Active?

326 Views, 4 Replies
10-26-2012 09:24 AM

How can I tell when a viewport (any viewport) in paper space is currently active.  Is there a setvar for this?

 

Please see my attachment to visually see what I mean.

This is actually related to a .NET programming error, whereby even when the drawing is in Paper space, if a viewport is active, I am unable to programmatically access the Layout.  I need to be able to, at a minimum, detect this condition, then switch back to full paper space (i.e. de-activate the viewport) if possible.

 

TIA

*Expert Elite*
leothebuilder
Posts: 481
Registered: ‎07-05-2010
Message 2 of 5 (311 Views)

Re: How to determine if any Viewports are Active?

10-26-2012 11:10 AM in reply to: spanqy

I don't know the answer to your question, but you may get more answers if you post in a Customization discussion group

Valued Contributor
spanqy
Posts: 90
Registered: ‎11-13-2006
Message 3 of 5 (306 Views)

Re: How to determine if any Viewports are Active?

10-26-2012 11:19 AM in reply to: leothebuilder

I already did, thank you.

*Expert Elite*
GrantsPirate
Posts: 1,593
Registered: ‎08-15-2008
Message 4 of 5 (294 Views)

Re: How to determine if any Viewports are Active?

10-26-2012 01:23 PM in reply to: spanqy

Probably better ways, but CVPORT = 1 when there are not active viewports in the current layout.

----------------------------------------------------------------------------
If something I wrote can be interpreted two ways, and one of the ways makes you sad or angry, I meant the other one.
Valued Contributor
spanqy
Posts: 90
Registered: ‎11-13-2006
Message 5 of 5 (285 Views)

Re: How to determine if any Viewports are Active?

10-26-2012 03:23 PM in reply to: GrantsPirate

CVPORT works for me.  Thanks!

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 or visit the Installation and Licensing Forum to get help installing your software.