查看单个帖子
旧 2009-05-06, 02:43 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】how to get the color of a block

how to get the color of a block?
how to get the color of a block?
i have an oddbentity pointer. its linetype is byblock. how can i get(obtain) this linetype?
sample code:
code:
odstring linetypename = odent->linetype();
if (!linetypename.compare("bylayer"))
{
//(getting layer linetype)
} // if
else if (!linetypename.compare("byblock"))
{
//(how to get a block linetype?)
}
byblock linetype will be equal to the linetype of the block insert.
vladimir
ok. i will ask in another way:
i am dumping a table:
code:
oddbtableptr ptable = pent;
oddbblocktablerecordptr pblock = ptable->blockid().safeopenobject(oddb::kforwrite);
if (eok != ptable->explodetoblock(pblock))
{
//error handling
}
after this explosion i have line and text entities in database. the linetype of these entities is "byblock". how can i obtain a linetype of every line?
p.s. i do this explosion because i need to dump table object as a set of line and text objects. am i doing something wrong? may be you can suggest another way to do this?
up
can anybody answer?
hello dimedroll,
quote:
may be you can suggest another way to do this?
table entity has block which contents all line and mtext entities (oddbobjectid blocktablerecord() const. byblock linetype of these entities means table linetype. byblock linetype of table means table owner linetype.
best regards,
sergey z.
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)