|
高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】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.
|