large file without graphics data, how delete nongraphic


Hi,

MicroStation V8i + PowerCivil crash when rendering big graphical object, but a lot of this graphic is probably saved somehow and somewhere... File have now over 200 megabytes, but nothing visible, all levels are unused. Only VBA scan found some nongraphic elements, but can not be deleted. And also I do not know if these few (<100) model elements have 200 megabytes. Although I easly find from what model they come, but still i cant delete them, becuse "model.removeElement ele" throws error -2147218397 (bad modelRef). Is there any way to delete these elements through Microstation,  programming language or any utility?

File contains also few (<50) nonmodel objects, but that is all what i found. And I have no idea if they are deletable or how delete them.

Parents
  • Hi Petr,

    Unknown said:
    File have now over 200 megabytes, but nothing visible, all levels are unused.

    In my opinion the best solution is to use backup.

    Unknown said:
    Only VBA scan found some nongraphic elements, but can not be deleted.

    VBA is not right tool to access DGN internal structure, because VBA is high-level API, so many details are hidden and also not all DGN and MicroStation features are accessible from VBA.

    Unknown said:
    And also I do not know if these few (<100) model elements have 200 megabytes.

    Probably not, but some data structures (DTM, meshes, interal data structures) can be very large.

    Unknown said:
    s there any way to delete these elements through Microstation,  programming language or any utility?

    I agree with Jon that to compress the design file (with all option switched on) should be the first step.

    As the second, you can try verifydgn utility: key-in is "mdl load verifydgn; verifydgn repair" (or verifydgn repair alternatively) and to check in Message Center details, what is reported. The utility is not very powerful, but it can provide some extra information in the case the file is corrupted.

    To access DGN directly, MDL should be used. But a question is if an expected amount of work is equal to potential benefits.

    In some cases it can be hard to delete some elements, because they can depend on another, which makes the analysis more complex.

    With regards,

     Jan

  • If I have a fresh backup, then I use it. The first thing I tried was to delete what I can and I checked if this have any effect. After each change file are compressed and saved again. I tried to open the damaged file as reference and copy from it what I need, but this is also bad way (copies only graphic). I understand VBA is not the best, but slightly better than user tools and it's something what I know, unlike MDL.

    mdl load verifydgn - no error found

    I attach a file.

    www.uschovna.cz/zasilka/LIPJRX2GFDJL4467-XYT

    PowerCivil for Czech Republic V8i (SS4) 08.11.09.790

  • Unknown said:
    I took this on as a challenge for a normal user. I tried Compressing, then turning ON All the Compress Options and Compressing, I tried turning on View 3 and got "missing view handler" so was unable to do it, until I deleted the View Group. I Deleted Unused Fonts, Removed Saved View, Tag Data, Removed all Custom Data stored in the file "CUSTOMIZE DELETEALLDATA", Removed 1 Custom Display Style. I did anything I could think of, then did a Verify/Repair and the program found 2292 elements. Did another compress with only minor change in size from 206,265 KB > 206,243 KB. There is still allot of junk that the Compress Options still doesn't get rid of.
    I File Fenced (FF=) to a new file and size went from 206,265 KB to 10 KB
    I did note that the file was originally a V7 file, and had a number of hours it was worked on. It might be good to start with a new seed file or at least the file generated from the File Fence, since there is no way a typical user can get rid of that junk other than using the ancient File Fence! But there should be!
    Jans’ option to search thru the file with MDL is probably the only hope to get rid of the data stored in the file.

    This is why we need a FREE utility from Bentley  that worked like Edg but with a GUI interface... in the old days we used to do miracles with Edg via  command line in DOS ( for the youngsters  DOS was the operating system was before windows)... apart from buying axiom file fixer ( pretty pricey for small outfits) ..... their really isnt another option for end users to repair corrupt files.. Edg could even replace or delete text on massive numbers of files in very short time... even scan all files for errors....and  produce a report on bad files.... 

    Lorys

    Started msnt work 1990 - Retired  Nov 2022 ( oh boy am I old )

    But was long time user V8iss10 (8.11.09.919) dabbler CE  update 16 (10.16.00.80) 

    MicroStation user since 1990 Melbourne Australia.
    click link to PM me 

  • Copying cant help me, because what I want to keep from file is not only graphic, but application data. Everything what I try always just copies graphics - file fence, copy from reference file or join reference file to the active.

    PowerCivil for Czech Republic V8i (SS4) 08.11.09.790

  • Hi Petr,

    Unknown said:
    because what I want to keep from file is not only graphic, but application data.

    There is a contradiction in your request in my opinion: You want to remove data that do the file so large, but you want also to maintain application data. But the application data do the file so large.

    I am not familiar with PowerCivil API enough, so I am not sure if there are functions to work with data stored in DGN file. And there is always a threat the data will be corrupted, so PowerCivil API will be not able to access them in a standard way. Contrary to it native C/C++ code is able to access DGN data directly, but there is no published information how to distinguish between MicroStation data, PowerCivil data and other application data. It's not problem to analyse the data, but without further reverse engineering (which is really time consuming task) it's hard to define they meaning.

    It's similar to business data stored in database: Database engine is able to maintain basic structural integrity like primary key - foreign key dependency (which is similar to relation of XAttributes element attached to (non)graphical element), but without a knowledge of data schema, it's easy to corrupt it when the database will be modified directly.

    In my opininon there is no simple quick solution other than when PowerCivil crashes, to use backup. Alternative solution is to try, step by step, analyse how PowerCivil data are stored and what can be removed and what not. But it requires a lot of time and very good knowledge of DGN V8 structure (especially XAttributes and application data element structure as I guess they are used primarily). In a midle there is an option to try available civil API, if some from them is able to find some data in the file.

    With regards,

      Jan

  • The original file contains many graphics or rather civil application elements. I deleted them and sent only a file with what I need to delete from original file. I hope it's not too complicated, but depending on what you write it is rather impossible (in any reasonable time).

    PowerCivil for Czech Republic V8i (SS4) 08.11.09.790

  • Hi Petr,

    Unknown said:
    I hope it's not too complicated, but depending on what you write it is rather impossible (in any reasonable time).

    In my opinion it's at first risky in a way "very unsure result". The problem itself is not so complicated, it's about XAttributes and applicaiton data, on the other hand it requires also at least basic knowledge how PowerCivil works.

    But I personally don't like to create any serious expectation when conditions are fuzzy and there is not enough experience. I guess to spend a day or two will probably provide much better understanding of the problem complexity and allows to make a decision about further steps.

    Regards,

      Jan

Reply Children
No Data