.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to ZOOM in/out with .net?

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
925 Views, 3 Replies

How to ZOOM in/out with .net?

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
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: Anonymous

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
Message 3 of 4
Anonymous
in reply to: Anonymous

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
Message 4 of 4
newArch
in reply to: Anonymous

Using SendStringToExecute metod of Document object (_
Autodesk::AutoCAD::ApplicationServices::Document)
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);

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost