BUG
When running a VBScript created by exporting a model, a syntax error may be raised in certain situations. For example, a situation when a VBScript uses the Define Projection tool.
When model builder performs the export, it uses a comma as a place holder for unused parameters. If the last parameter is unused, the last comma is in violation of VBScript syntax conventions. For example:
Code:
gp.DefineProjection_management states_shp_3, "GEOGCS['GCS_North_American_1927',DATUM['D_North_American_1927
',SPHEROID['Clarke_1866',6378206.4,294.9786982]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]",
Note:
Right-click the script within ArcToolBox and click edit.
Code:
gp.DefineProjection_management states_shp_3, "GEOGCS['GCS_North_American_1927',DATUM['D_North_American_1927
',SPHEROID['Clarke_1866',6378206.4,294.9786982]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]"
Article ID:000007512
Get help from ArcGIS experts
Download the Esri Support App