I am trying to use Min-Lang Huang's XYZ2GRID2.1-Batch program downloaded from ArcScripts and I keep getting the error

C:\users\public...........xyz Error-Object required

Does anyone know what the problem is? I have created an empty ASCII folder and an empty GRID folder and all the rest of it but not sure what the problem is. Does this script need to sit anywhere special? How does it know that my spatial extension is activated?

I am using ArcGIS Desktop 9.3.1 and Windows Vista.

  • It has something to do with missing references and a few qualifications need to be added to make it work under Windows 7 and 9.3.1 and greater. The source code is included so if you can debug in VB6 and recompile you can fix it. I received a written permission from Min-Lang Huang to upgrade the tool for version 10 but have not had a chance to do it yet. Commented Oct 13, 2010 at 17:17
  • Leid, I am having the same issue. I keep getting the error "type mismatch". My data is in X Y Z format. Did you ever figure out how to get this program to work? Thank you
    – user3631
    Commented Jul 12, 2011 at 19:41

2 Answers 2


I remember using that tool, helped me a lot, but did not personally have any problems with it, so cant help with your error.

Other than Jakubs response above, can you not just run the Ascii to Raster tool in batch mode, direct from ArcToolbox?

  • I find that the problem is converting XYZ to ASCII grid files. Once in ASCII grid format they can be viewed and manipulated in ArcGIS and as you say at this point you can use the ASCII to raster tool. This is why this is the only feature I left in the original tool. Commented Oct 16, 2010 at 12:27

The original tool requires Spatial Analyst and it checks for it when it runs the various procedures. I upgraded and simplified it so that it only batch-processes XYZ to ASCII Grid which can then be viewed in ArcGIS. I though the ASCII to ESRI Grid step was redundant and it also required Spatial Analyst which the simplified version does not. I compiled it on a Vista machine with ArcGIS 9.3 so it should also work in 9.3.1. Let me know if encounter any issues; did not really have time to test properly.


just run the exe

Not the answer you're looking for? Browse other questions tagged or ask your own question.