![]() |
【转帖】oddbselectionsetptrnumentities90 for xrefs
oddbselectionsetptr::numentities() for xrefs..
oddbselectionsetptr::numentities() for xrefs.. hi all, i am trying to access entity depending on the layer name. in case of xrefs i am not able to get entities.. here is the code snippet.. oddbblocktableptr pblocks = pdb->getblocktableid().safeopenobject(); oddblayertableptr playertable = pdb->getlayertableid().safeopenobject(); oddbsymboltableiteratorptr pi = playertable->newiterator(); for (pi->start(); !pi->done(); pi->step()) { oddblayertablerecordptr player = pi->getrecordid().safeopenobject(); odstring layername = player->getname(); odresbufptr rb = odresbuf::newrb(odresbuf::kdxflayername, layername); oddbselectionsetptr setofentities = oddbselectionset::select(pdb,rb); int count = setofentities->numentities(); } in case of xref layername is something leik "xref|111", where in xref i have 111 as layer and few entities in xref.. but "count" in case of xrefs is always 0. even i tried to set layername = 111 in filter, still count is 0. please help me out i am new to od so please let me know if i am doing anything wrong.. thank u.. oddbselectionset::select() works with modelspace and paperspaces only. vladimir so what should i use in case of xrefs?? yes i am working with model space only.. search directly in the xref database. (it is accessible via oddbblocktablerecord::xrefdatabase()) vladimir |
所有的时间均为北京时间。 现在的时间是 04:25 PM. |