Zoom Extents with C#

Zoom Extents with C#

Anonymous
Not applicable
2,212 Views
2 Replies
Message 1 of 3

Zoom Extents with C#

Anonymous
Not applicable
Someone have done a Zoom Extents with C#?? Or how to execute the command with C#??
0 Likes
2,213 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
http://www.caddzone.com/CommandLine.cs

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

wrote in message news:5783823@discussion.autodesk.com...
Someone have done a Zoom Extents with C#?? Or how to execute the command with C#??
0 Likes
Message 3 of 3

Anonymous
Not applicable
Hey, I'm new here and maybe it's too late for you, but could be useful for the other guys. Here is what I did, and worked nice:

AutoCAD.Interop.AcadApplication app = (AutoCAD.Interop.AcadApplication)Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication;
// your code to draw geometries, or something else
app.ZoomExtents();

To make it work, u have to add the following dll:

...\ObjectARX 2008\inc\Autodesk.AutoCAD.Interop.dll

Regards,
0 Likes