Friday, November 30, 2018

Creating a “zero byte” MXD file to use with any version of ArcGIS

Creating a “zero byte” MXD file to use with any version of ArcGIS

One of the challenges sometimes faced when sharing any of Innovyze non-workgroup products that run in ArcGIS such as InfoWater, InfoMaster, InfoSewer, and InfoSWMM is when different users are using different versions of ArcGIS.  When you attempt to open a model that was saved in a higher version of ArcGIS than you are using, you will get an error message that the file cannot be opened.
One of the easiest ways to get around this issue if you need to send a model to someone running an older version of ArcGIS is to create a “zero byte .mxd” file that can be opened in any version of ArcGIS without issue. If you make the MXD a zero byte file it will strip away any Arc GIS specific information which allows you use the model database data in the IWDB or ISDB folder to be used in any version of Arc GIS. You can do the following to make the zero byte MXD file:
  1. Browse in Windows Explorer to the location of the model you wish to send
  2. Use Windows Explorer make a new Text File (right click –> choose NEW -> select Text document)
  3. Use Windows Explorer to copy the name of the existing MXD file (example -> model1.mxd)
  4. Delete the existing MXD file or rename it to “model_name-old” (example -> Model1-old.mxd)
  5. Now paste in the copied old name to Rename the Text file with the name of the MXD file (example the text file should now be Model1.mxd)
    1. NOTE: You must have windows showing file extensions in the name to actually change the file type. If you do not see “New Text Document.txt” as the name but just see “New Text Document” it will not change the file type when you rename it. -> Please Google how to show file extensions in Windows “X” if needed.
    2. Windows will ask if you wish to rename the extension of the text file, but just say yes if a warning popup arises
    3. Example renaming and new zero Byte MXD file (click for larger image if necessary)
  6. The new text file is now a MXD file that will now have no content and have a size of zero bytes (NOTE: If you are saving this for someone else, do not open the zero byte file in your higher version or that will add ArcGIS version information to the file.  Make sure to send it to them as a true “zero-byte” mxd file.)
  7. On the computer using the lower version of ArcGIS Double click on the new zero byte MXD file to open and initialize the model as you normally would.
  8. When the model opens and initializes you may need to hit the Reset display button to update the model layer color coding to the default values (Reset display is the yellow palette with an arrow over it as shown below
    1. Reset Display Icon (click for larger image if necessary)
      1. reset-display-icon
This procedure is often much simpler than using the “Save a Copy” procedure to save the ArcGIS file in a lower version where you have to copy the model database folder and have it match the name of the new .MXD file and can save you time when you run into ArcGIS versioning issues.
As noted, this procedure can be used in any  Innovyze non-workgroup products that run as extensions in ArcGIS such as InfoWater (and InfoSurge which runs in InfoWater), InfoMaster, InfoSewer, and InfoSWMM.

No comments:

Urban flooding from WrathofGnon on Twitter

  Urban flooding is the inundation of land or property in urban areas caused by heavy rainfall, stormwater runoff, or coastal surges. This t...