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

oddbentity::setlayer with undefined layers
oddbentity::setlayer with undefined layers
how is oddbentity::setlayer(const odstring& newval, bool dosubents = true) and similar entity functions defined to behave when "newval" has the name of an undefined layer:
a) establish a layer with default values of that name and set entity layer to the new layer entry.
b) treat it as an error and leave entitity layer unchanged.
either way will do, but the choise has consquences for implementation.
-rune jorgensen
www.dds.no
i think dwgdirect is designed to throw oderror() exceptions when there are invalid data and is supposed to leave the state of the objects (in this case both entities and layers) unchanged.
i don't know whether it is the same with this very function, you should try it yourself?
best regards
chudomir
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)