查看单个帖子
旧 2009-05-05, 11:49 AM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】hatch copy problem

hatch copy problem
hatch copy problem
i have one hatch pointer and i want to copy it to another newly created hatch pointer. how can i do that. please help me .. its urgent ..
do you want to copy pointer or hatch entity?
if an entity, within the same database or to another one?
sergey slezkin
thank for the quick response ... i have to copy a hatch entity within the same database. thanks in advance ..
thanks a lot sergey . i used clone function and got the result. thank u again
clone() will produce exact copy of hatch entity which can be appended to a block in the same database but not to another database because it references layer, linetype etc. from the first database.
also note that if the hatch is associative its boundaries will be associated with the same entities as boundaries of original hatch.
in general using clone() for all entities is not safe. for example cloned oddbpolyfacemesh will reference the same vertices and faces as the original one. to clone such complex objects which own subobjects within the same database oddbdatabase::deepcloneobjects() should be used.
for cloning to another database oddbdatabase::wblockcloneobjects() should be used. it will take about references to linetypes, layers etc.
sergey slezkin
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)