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

odavematerial from oddbentity
odavematerial from oddbentity
i am trying to determine which odavematerial is relevant to a particular oddbentity and haven't found anything similar to oddbsymutil::islinetypebylayername.
how do i know which ave material goes with an entity?
what i am currently doing, given oddbentityptr "ent", is this:
code:
gam = odavematerial::getattachedmaterial(ent->objectid(), materialid);
if ( ! gam )
gam = odavematerial::getattachedmaterial(ent->layerid(), materialid);

if ( gam && ! materialid.isnull() )
{
do something here with materialid
}is that correct?
i think i would benefit from a sample which clearly demonstrates correct handling of every method for determining colors, materials, and linestyles out there. perhaps it could work off a .dwg file that could also serve as a test case, which i could then use to test my own code.
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)