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

dwginfields use ???
dwginfields use ???
hello,
i'm trying to use dwgdirect and want to get access to entities and retrieve values of some stuff like points coordinates, color, etc...
i really don't get how to use dwginfields fonction especially what is [oddbdwgfiler* pfiler] parameter
here is an extract of my code which is an extract of dwgdirect example (!!)
-------------------------------------
// get an entity iterator
oddbobjectiteratorptr pentiter = pblock->newiterator();
// for each entity in the block
for (; !pentiter->done(); pentiter->step())
{
oddbentityptr pentity = pentiter->entity();
oddbdwgfiler* pfiler = null;
if(!pentity.isnull())
{
os << "color :" << pentity->color().color() << std(endl);
// here i'd like to use pentity->dwginfields(pfiler) but it crashes !!!
}
//etc...
-------------------------------------
thanks a million for exlplaining me how does this dwginfields functions works
damien.
dwginfields() gets called than an object is loaded from file. it reads the data and stores it in object. it also gets called than the database performs some operations (cloning objects, writing undo info, performing undo operations, tracking object references etc.)
you need not call it to get color of entity. why not to simply call oddbentity::color()? or other methods returning properties, coordinates etc.?
sergey slezkin
thanks sergey,
we obviously use color() function etc. it was sort of a stupid question but i was just wondering ...
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)