高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】custom objects
custom objects
custom objects
i encountered a dwg file that contains some custom objects.
this file can be ploted perfectly by autocad when corresponding arx was loaded,
and i can abtain the geometry extents of those custom objects in my arx application.
the problem is whether opendwg supports custom objects, and if it does, how can i do it.
thank you for your help.
exactly as in autocad in dwgdirect you can obtain the geometry extents etc. of custom objects if corresponding .drx application (implementing the objects) is loaded.
see developer's guide (implementing custom objects and commands), excustobjs sample and smiley sample (an arx sample ported to dd).
existing .arx code can't be recompiled for dwgdirect - it needs porting. but implementing the same objects in dd is not difficult if you have .arx sources.
btw, architectural desktop objects are implemented in adtdirect - a set of .drx implementing adt objects.
sergey slezkin
the custom objects are developed by other company, i only have a arx file to view it, not have arx source, so that i can't convert arx into drx. but my client hopes to use opendwg to view it and abtain the geometry extents of those custom objects
please give me some advices that how to solve this problem.
thank you.
in attachment contain a dwg file which has some custom objects, and a arx for viewing custom objects. both of them are used by autocad2002.
please make tch_kernal2.zip rename tch_kernal.z01
attached files (878.0 kb, 3 views)
(1.16 mb, 2 views)
(282.7 kb, 2 views)
(151.0 kb, 4 views)
for custom objects autocad stores their geometry representation and/or extents in drawing file. so the objects can be rendered even if arx implementing them is missing. dd does the same but:
1. the geometry stored is viewport independent (produced by worlddraw()). if an entity appearance is viewport dependent it can't be rendered without arx (or drx in dd).
2. custom entity can be implemented in such way that it does not store geometry representation to file (depends on arx developer).
3. proxygraphics system variable in autocad defines if geometry representation for custom entities should be stored to file or not. so autocad user can turn off saving proxy graphics (geometry of custim entity).
so dd without drx can render custom objects and get their extents exactly as autocad without arx. to be able to view them like autocad with arx you need implement corresponding drx.
sergey slezkin
thank you for your help.
i have anther question about customer objects:
custom objects in a dwg saved with autocad system variable proxygraphics being 0 can be viewed as rectangles representing their geometric extents when corresponding arx or drx is not loaded.
so be them when plotting the dwg to a dwf file, i think. but i have a last hope that maybe they can be rendered as they ought to be when using opendwg in some way. is there such a way or not?
where are 2 opportunities to render custom objects:
1. using their graphic representation saved to file (see above post for limitations).
2. by having the enabler for custom object( .arx or .dbx in autocad or .drx in dwgdirect).
the enabler in order to render the custom objects correctly does not need full .arx implementation. the minimal set of functions is:
dwginfields() , dwgoutfields()
dxfinfields() , dxfoutfields()
worlddraw()
viewportdraw() - (if geometry is viewport-dependent)
sergey slezkin
|