![]() |
【转帖】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 ... |
所有的时间均为北京时间。 现在的时间是 08:35 PM. |