Repair

Top  Previous  Next

SVG files can become corrupted or damaged in ways that can make them unreadable in Inkscape, Illustrator, Walls and the SVG Exporter. This can happen when the user accidentally makes a change to the layer structure. It can also happen when a drawing program modifies an SVG file in ways that incompatible with cave mapping. (Click here for detailed information about the kind of problems that can occur with SVG Cave Maps.)

 

To deal with these problems, the SVG Exporter can repair and restore the file. It does this in two situations:

 

1. Automatic Repair. If you use the SVG Exporter to Merge/Morph an SVG files, the program will automatically repair any problems that if finds. This is necessary because the program can process a map file unless the format of the file is correct.

 

2. Manual Repair. You can also manually repair a file without merging or morphing the file. This is useful when you are working an SVG generated by another program or when you want to repair problems with making any the adjustments that would in the Morphing/Merging operation.

 

 

Repair Operations. In order to repair a file, the Exporter performs a series of operations that systematically test for and fix problems. Here is a description of the steps:

 

a. Validate The File. The program starts by testing the file to make sure it satisfies the SVG and XML rules. It makes sure that all the Inkscape and Illustrator namespaces are included in the file. Without these namespaces, Inkscape, Illustrator and SVG Exporter wouldn't even be able to load the file.

 

b. Handle Clip Frame. In this step, the program adds or removes the Clipping Frame depending on the compatibility settings.

 

c. Remove Binary Data. In this step, the program can remove any Binary Data that Illustrator may have inserted in the file. The option is enabled or disabled by the compatibility settings.

d. Fix Layer Names. The program checks that all the Layer Names haven't been changed. If they have been changed, the program changes them back to their original names. Illustrator will randomly rename a layer by appending a number to the name like this: "w2d_background_3_." Compass and Walls won't be able to find a layer whose name has been changed and so they won't be able to adjust it.

 

e. Add Missing Layer. The program checks to see if the file has all the required layers. If any layer is missing, the program add it.

 

Repair Tool. You can Repair or Convert any SVG files to a format that is compatible with Compass or Walls using the built-in repair tool that comes with the SVG Exporter.

To access the Repair/Conversion tool, select the "Tools -> Repair/Convert Filest" option from the menu bar. The dialog shown to the right will be displayed.

Begin by filling in the "Input SVG File." This will be the file you want to convert. If you press the button just the right, it will take you to the standard file-opening window and you can select the file that way.

ConvertDialog

Next fill in the "Output SVG File." You should choose a file with a different name so that if something goes wrong, you won't lose your original data.

When you have filled in the file names, press the "Convert" button. You will be presented with the "Compatibility Dialog," so you can make the file compatible with the drawing program or programs you be using.  Once you've made your compatibility settings, the file will be converted and you now should be able to use the file with Compass, Walls and the drawing program you chose.