.NET

Reply
*Zhongwei Xia
Post 1 of 4

How to ZOOM in/out with .net?

202 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
3 Posts
0 Kudos
Registered: ‎07-06-2005
Post 2 of 4

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
Post 3 of 4

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
9 Posts
0 Kudos
Registered: ‎07-03-2005
Post 4 of 4

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);
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!