*Norman Yuan
Message 1 of 2 (143 Views)

NET API (2006): No way to zoom?

143 Views, 1 Replies
07-16-2006 11:11 AM
I haven't done much programming on ARX .NET API so far, just a few projects
that connect to external database to update block attributes or search
drawing database for certain entities. Now I decided to do more with .NET
API and want to create a few drawing view manipulation methods, including
giving user to capability to zoom in/out/to a selected entity.

To my big surprise that I cannot find a way to do zooming: there is no
zoom() method at all in Acad2006's .NET API. In VBA, AcadApplication object
has a few methods of zooming: ZoomAll(), ZoomWindow().... But in .NET API,
nothing at all.

I am so puzzled as such method is so basic if you want to Acad programming.
Then I installed Acad2007 (our office has Acad subscription, but can only
managed to do the upgrade every two releases and do not want to play with
each new yearly buggy release until at least SP1 is out, and Acad2007's SP1
was out too quick and I do not qualify it as SP1, so we'll wait for another
SP, if there will be one), and finally find a "View" class in
Autodesk.AutoCAD.GraphicsSystem namespace that has the needed zooming
methods. Then I went back to the class hierarchy drawing coming with
ObjectARX SDK, it is clear that GraphicsSystem does not expose to .NET API
in Acad2006 (naturally also in Acad2005). That means, with Acad2006, I
simply do not have a way to zoom with .NET API. I want to zoom in .NET code,
I need Acad2007.

Am I wrong here? If I go to Acad2007, who knows if there is some basic
feature missing to get you stuck halfway of your developing? With basically
no readable documentation and incomplete key APIs, do you think Object ARX
.NET API is ready for serious development?
Distinguished Contributor
Alexander Rivilis
Posts: 303
Registered: ‎09-26-2004
Message 2 of 2 (143 Views)

Re: NET API (2006): No way to zoom?

07-16-2006 12:25 PM in reply to: *Norman Yuan
1) You can use P/Invoke for ObjectARX native function (look at: http://www.theswamp.org/index.php?topic=10475.0)
2) You can use COM model from .NET application (e.g. using ZoomAll(), ZoomWindow(), etc.)
Add Reference to:
a) AutoCAD 2006 Type Library
b) AutoCAD/ObjectDBX Common 16.0 Type Library

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

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 to get help installing your software.

Ask the Community