.NET

Reply
*Zhongwei Xia
Message 1 of 4 (184 Views)

How to ZOOM in/out with .net?

184 Views, 3 Replies
10-07-2005 07:12 AM
Hello,

I'm trying to do ZOOM in/out with C#. It's similar to AutoCAD ZOOM command.

Has anybody done something like this? Do I have to create a ViewPort object
and activate the ViewPort?

Thank you.
Zhongwei Xia
Member
GaryPuerini
Posts: 3
Registered: ‎07-06-2005
Message 2 of 4 (184 Views)

Re: How to ZOOM in/out with .net?

10-25-2005 04:04 PM in reply to: *Zhongwei Xia
I was just fighting with a similarproblem....here's what was suggested to me. Worked great...

AcadApplication pApp;

pApp = (Autodesk.AutoCAD.Interop.AcadApplication)Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication;

pApp.ZoomExtents();

Gary Puerini
Simpad,LLC
*Zhongwei Xia
Message 3 of 4 (184 Views)

Re: How to ZOOM in/out with .net?

10-27-2005 09:38 AM in reply to: *Zhongwei Xia
Hello, Gary,

Thank you very much.
Zhongwei Xia

wrote in message news:4994648@discussion.autodesk.com...
I was just fighting with a similarproblem....here's what was suggested to
me. Worked great...

AcadApplication pApp;

pApp =
(Autodesk.AutoCAD.Interop.AcadApplication)Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication;

pApp.ZoomExtents();

Gary Puerini
Simpad,LLC
Active Member
newArch
Posts: 9
Registered: ‎07-03-2005
Message 4 of 4 (184 Views)

Re: How to ZOOM in/out with .net?

11-08-2005 11:03 PM in reply to: *Zhongwei Xia
Using SendStringToExecute metod of Document object (_
Autodesk::AutoCAD::ApplicationServices::smileyvery-happy:ocument)
is another way.
exp :
.SendStringToExecute("Zoom e ", False, False, False);
.SendStringToExecute("Zoom s 2 ", False, False, False);
.SendStringToExecute("Zoom W 0,0,0 10,10,10 ", False, False, False);
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.