*Norman Yuan
Post 1 of 2

NET API (2006): No way to zoom?

151 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
303 Posts
1 Kudo
Registered: ‎09-26-2004
Post 2 of 2

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

Have questions about Autodesk products? Ask the community.

New Post
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!