.NET

.NET

Reply
Active Contributor
GLDMustang
Posts: 33
Registered: ‎05-24-2005
Message 1 of 3 (247 Views)

Zoom Extents - UpdateExt values do not update

247 Views, 2 Replies
06-20-2013 07:58 AM

All,

Every example I've seen for writing a .NET version of ZOOMEXTENTS shows the Document.Database being updated with UpdateExt(true).  Does anyone have any idea why, after executing this line, my Extmin and Extmax values remain unchanged? 

 

My process is something like this:

*   Inside Drawing1.dwg

*   Make sure I'm in Paper Space (which contains a 36x24 border)

*   Zoom Extents  --  At this point, my code attempts to do a SetCurrentView using the new ViewTableRecord and I get an an eNullObjectPointer exception.

 

I'm assuming the exception is because the HUGE or maybe ununderstood extents (the defaults are (-1E+20, -1E+20, -1E+20))...  I could be wrong about that.  Anyway if anyone has any suggestions, thoughts, or ideas why the Extmin and Extmax aren't updating I'd certainly appreciate it.

Regards,

Guy

Moderator
Alexander.Rivilis
Posts: 1,406
Registered: ‎04-09-2008
Message 2 of 3 (231 Views)

Re: Zoom Extents - UpdateExt values do not update

06-20-2013 04:01 PM in reply to: GLDMustang

Incorrect EXTMIN / EXTMAX values for a drawing - maybe this post help you.

EXTMIN and EXTMAX depend on ModelSpace extents and not PaperSpace extents.

PEXTMIN and PEXTMAX depend on PaperSpace extents.

Also this link can be useful: http://forums.autodesk.com/t5/NET/Drawing-extents-in-Paperspace/m-p/3178638#M25435


Пожалуйста не забывайте про Утвердить в качестве решения! Утвердить в качестве решения и Give Kudos!Баллы
Please remember to Accept Solution! Accept as Solution and Give Kudos!Kudos

Active Contributor
GLDMustang
Posts: 33
Registered: ‎05-24-2005
Message 3 of 3 (202 Views)

Re: Zoom Extents - UpdateExt values do not update

06-21-2013 04:57 AM in reply to: Alexander.Rivilis

Thanks Alexander...

When I first started researching my problem, I found the first link that you mentioned.  I actually copy and pasted that code into my solution and still got the same exception/error.  I had not seen the other article that you posted.  I'll read up and study on that a bit and see if I haven't missed something elsewhere in my initial DWG or in my code; both of which I'm starting to suspect.  The PEXTMIN and PEXTMAX settings look interesting/promising and I'll check that out this morning.  I'll post my results later.

 

Thanks again for the reply,

Guy

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.