- UID
- 1
- 积分
- 15891
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2002-1-3
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
Question
What is the difference between an ObjectARX application and an ObjectDBX
application? What is an object enabler (or ObjectDBX module)? What is the
appropriate Software Development Kit (SDK) to develop an ObjectDBX module:
ObjectARX or ObjectDBX?
Answer
One of the most robust features of the ObjectARX technology, introduced with
AutoCAD Release 13, is that it enables thirdy party AutoCAD developers to add
new object types (also called "custom objects") to the set of standard objects
defined by AutoCAD, such as line, circle, layer, etc.
For example, an AEC software developer will typically want to define a wall or a
building schedule object, a Mechanical software developer will want to define
part and assembly objects, and so on. In order to manipulate such objects,
which are not one of its native objects, AutoCAD needs to delegate to the
defining ObjectARX application. For example, AutoCAD will "ask" the parent
ObjectARX application to output the necessary geometry in order to represent an
instance of the new object because it does not know what it should look like.
Because these objects can be persistent, which means they are saved in a
drawing, there is a potential problem when such a drawing is opened in AutoCAD
and the parent ObjectARX application is not loaded or not present. How should
AutoCAD represent such objects? How should it move, rotate or copy them? In
order to solve this problem, the ObjectARX technology also introduced the
concept of a proxy object, which is a special AutoCAD-native database object
capable of providing a default representation and behavior of an unknown object
in a drawing database. However, when the parent application is not present, the
default representation and behavior supplied by the proxy object is limited, and
sometimes not satisfactory.
The concept of object enabler is the answer to the proxy object limitations. An
object enabler is an application developed by the custom object provider, which
is the AutoCAD third party developer, and contains the object definition itself.
This object definition is enough to provide the object with the expected
behavior when the drawing is loaded, but typically does not allow sophisticated
editing (editing beyond standard move, copy, rotate, etc.). The definition of
this "minimum" behavior belongs in a large extent to the application developer
who can decide to provide more or fewer capabilities to his objects when the
full parent application is not present.
Therefore, it is recommended that an ObjectARX application defining custom
object(s) isolate the object definition(s) in an object enabler module, which is
a module that is distributed freely to users manipulating drawings containing
such custom objects.
With the introduction of the DWG Unplugged technology, which has been renamed to
ObjectDBX technology, Autodesk has also enabled third party developers to write
applications capable of reading and writing AutoCAD drawing databases (.DWG
files) without AutoCAD having to be present. Therefore, the ObjectDBX technology
is independent of the AutoCAD editor, which means a call is not made to
acad.exe. To think of it in another way, ObjectDBX can be viewed as ObjectARX
without the editor -specific API (typically the Aced classes and global
functions).
Object enablers, which should also be able load into such applications because
they are capable of reading and writing .DWG files, should also be independent
of the AutoCAD editor and use the ObjectDBX technology.
"ObjectDBX module" refers to the ObjectDBX component of an ObjectARX application
defining custom object(s). An ObjectDBX module, just like an ObjectARX
application, is a Dynamic-LinkLibrary (DLL). Applications developed using the
ObjectDBX SDK are capable of loading object enablers -- ObjectDBX modules -- and
are called ObjectDBX host applications. AutoCAD itself is an ObjectDBX host
application, and actually uses the very same technology provided in the
ObjectDBX SDK.
The ObjectARX SDK can produce both ObjectARX applications and ObjectDBX modules.
Both are DLLs and both export the acrxEntryPoint() function. The difference
between the two is essentially that ObjectARX applications link into libraries
that make them dependent on AutoCAD (they import functions from acad.exe), while
ObjectDBX modules do not. The AutoCAD-dependent libraries are:
acad.lib
acedapi.lib
acsiobj.lib
acui15.lib
oleaprot.lib
rxheap.lib
The ObjectARX SDK cannot produce ObjectDBX host applications; only the ObjectDBX
SDK can be used, which is subject to a special licensing agreement.
Please see the attached document for more information on the ObjectDBX security
issues. |
|