高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】empty xref blocks
empty xref blocks
empty xref blocks
hi,
i just noticed that when i am loading dwg files with xrefs, the layers etc. were imported, but not the content of the xref file: a closer look revealed that the blockdef which should contain the contents of the xref was empty.
i am using oddbxrefman::reloadall(..) to load all xrefs, and it worked in the past. was there a change with the new version 1.12 concering xref handling?
torsten
hi torsten,
it's maybe a bug in 1.12. xref loading was redesigned.
send the problem dwg file please.
dmitry.
hi dmitry,
well, i am a little confused now. first, i checked the odreadex sample, and it showed the same result as my program: the xref layer was read, but not the contents of the xref. then i checked the 1.11 and 1.10 version of the sample program - same result.
all versions of the odamfcapp sample draw the complete xref, but the contents list shows an empty block for the attached xref.
so obviously your code works, and the bug is on my side. and i have no clue where it can be...
as far as i know, attached xrefs are loaded as 'normal' blocks, no special handling required except for oddbxrefman::reloadall(..). has this changed with the new version?
torsten
some functions like getting extents, rendering implicitly causes xref loading.
you can check block table record's xref status and if it is not loaded call reload (not reloadall) for that specific block. or simply call reload without "force" parameter.
sergey slezkin
sergey,
when i check the xref status of the blocktablerecords, all of them have the status kxrfnotanxref.
torsten
could you post a sample file?
sergey slezkin
sorry, sorry, sorry - yesterday i tested v1.11, and i forgot to switch back.
now, with v1.12 the xref status for the xref block is kxrffilenotfound.
i checked the path with pathname(), but it was ok.
i uploaded the two files i am working with:
xref1.dwg is the main file which contains the xref,
source_1.dwg is the external reference.
torsten
p.s.: i tried to reload the xref, but the status remained the same.
attached files (23.5 kb, 2 views)
(26.5 kb, 2 views)
last edited by torsten; 4th november 2004 at 09:15 amfff">.
update: i did some testing with the odvectorizeex sample (which reads the xref contents), and i found out, that right after the svcs.readfile(...) call the status of the xref block is kxrfunresolved. after a reload of the block, the status is kxrfresolved.
with my program, the initial status is kxrfunresolved, too, but after a reload it changes to kxrffilenotfound.
any idea what's going wrong?
torsten
finally i found it: in exhostappservices.cpp, i added the function exhostappservices::findfile( ... ) some time ago to find special fontfiles.
the error was that i returned a null-string if no fontfile could be found. i didn't think of other files i.e. xref files, which could use this function, too. now it is fixed, and the xref is loaded. and i have another problem, but i'll post it in a new thread...
thanks for your help and sorry for any inconvenience...
torsten
|