fantum is correct.
Managed and native ObjectARX APIs are divided into two basic layers, one
that is not dependent on AutoCAD (as the 'host'), and can be used in RealDWG
applications (which for managed code, is acdbmdg.dll). and a second layer,
which is completely dependent on AutoCAD and cannot be used in RealDWG
applications (which for managed code, is acmdg.dll).
The HostApplicationServices object resides in the database layer, which
means that it is available to any application even when running in another
host (e.g., a RealDWG host application). The Document, DocumentCollection
and most other AutoCAD document/editor related APIs are in the application
layer (acmgd.dll), and are only available in AutoCAD.
So, if you are writing an application that you want to run in non-AutoCAD
RealDWG host applications, you cannot reference acmdg.dll or use anything
from it, and so the HostApplicationServices object is used to get the
'current' database.
In AutoCAD the two APIs always return the same database.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009
http://www.acadxtabs.com
Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm
wrote in message news:6149531@discussion.autodesk.com...
Hi, Sorry about the newby question, but you try to search for the two
terms in the subject of this post: just about every thing ever written about
AutoCAD and .NET is returned. What is the difference between instantiating
my database with this: HostApplicationServices.WorkingDatabase and
with this : Application.DocumentManager.MdiActiveDocument.Database.
Is one better in certain circumstances? They seem to be used interchangeably
in the code I see. Thanks in advance for anyone with the time. Bernie