![]() |
【转帖】get list of attribute tags
get list of attribute tags
get list of attribute tags i'm trying to list down the attribute tags for all the blocks. this is what i'm doing: oddbblocktablerecordptr pblock = pblkiter->getrecordid().safeopenobject(); oddbobjectiteratorptr pentiter = pblock->newiterator(); for (pentiter->start(); ! pentiter->done(); pentiter->step()) { oddbentityptr pent = pentiter->entity(); if (pent->iskindof(oddbtext::desc())) { print(tostring(otext->textstring())); } } otext->textstring() print blank data. i have another query. is it going to iterate thru all the instances of the block? if yes, this will be a waste of time bcoz i just need the attribute tag name. how can i get only the attribute tag for a block without iterating thru all the instances? if you look for attribute definitions, then cast entity to oddbattributedefinition, and ask it for 'tag' vladimir |
所有的时间均为北京时间。 现在的时间是 09:20 AM. |