![]() |
【转帖】how can i read proxy data
how can i read proxy data?
how can i read proxy data? hi there, i've got a dwg file with some proxy data in it. i'm reading it by calling explode and then iterating through the created subentities. this works fine most of the time but i get an exception thrown from within dwgdirect when the subentity is a 2dpolyline. i have code similar to this : in the proxy processing class : void a2dproxy:rocess(oddbproxyentityptr proxy) { oddbvoidptrarray entities; proxy->explode(entities); for (unsigned i = 0;i < entities.size();++i) { oddbentityptr ptr = oddbentity::cast(entities.getat(i)); if (!ptr.isnull()) { // make a correct reader class create_reader(ptr); } } } and in the 2dpolyline processing class : void a2d2dpolyline:rocess(a2d2dpolylineptr poly) { oddbobjectiteratorptr vertex_it = poly->vertexiterator(); for (;!vertex_it->done();vertex_it->step()) { // this next line blows up oddb2dvertexptr ptr = vertex_it->objectid(); . . . the 2dpolyline processing class works fine when the data is not part of a proxy. odamfcapp reads and displays the file fine so i guess i'm doing something wrong, but i cant figure out what it is :-( any help would be appreciated - thanks. attached files explode() method produces non-database resident objects which have no objectid. try oddb2dvertexptr ptr = vertex_it->entity(); sergey slezkin that did the trick. thanks for the quick reply. |
所有的时间均为北京时间。 现在的时间是 04:31 AM. |