![]() |
【转帖】ext And Acdbattribute Definition
text and acdbattribute definition
text and acdbattribute definition i have modified the reader example to display text strings that are contained in a dwg file. however some of the text is not being displayed. // get an entity iterator oddbobjectiteratorptr pentiter = pblock->newiterator(); // for each entity in the block for (; !pentiter->done(); pentiter->step()) { oddbentityptr pent = (pentiter->objectid()).safeopenobject(); if (pent->iskindof(oddbtext::desc())) { oddbtextptr penttext = pent; os << (penttext->textstring()).c_str() << std(endl); os << std(endl); } } this code displays some of the text, the other text appears to be in a acdbattributedefinition and i have been unable to figure out how to access it. any help would be appreciated. claudio try something like this - oddbattributedefinitionptr pattdef = pent;/* oddbattributedefinition */ os << "acdbattributedefinition tag - " << pattdef->tag().c_str << std(endl); os << " " << pattdef->textstring().c_str() << std(endl); for block references - you will have to drill into the block. attributes are attached to block reference. to access them use oddbblockreference::attributesiterator(). sergey slezkin |
所有的时间均为北京时间。 现在的时间是 09:50 PM. |