AutoCAD 2010/2011/2012

AutoCAD 2010/2011/2012

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

How to determine if any Viewports are Active?

338 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

CVPORT works for me.  Thanks!

*Expert Elite*
leothebuilder
Posts: 481
Registered: ‎07-05-2010
Message 2 of 5 (323 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 (318 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,648
Registered: ‎08-15-2008
Message 4 of 5 (306 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 (297 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!

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.