[GIS] Why “DataBase Connections” mapped to “Dataset DataBase Connections” in ArcCatalog

arccatalogarcgis-10.0arcgis-desktopenterprise-geodatabase

I am trying to Export data from a geodatabase by a existed sde file(created by ArcCatalog),
the Error Messges:

Executing: ExportCAD 'DataBase Connections\Connection to
GIS-WANG.sde\SDE.water\SDE.ControlValve' DWG_R2010 D:\117.DWG
Ignore_Filenames_in_Tables Overwrite_Existing_Files # Start Time: Thu
Oct 13 16:46:59 2011 ERROR 000622: Failed to execute (ExportCAD).
Parameters are not valid. ERROR 000732: Input Features: Dataset
'DataBase Connections
\Connection to
GIS-WANG.sde\SDE.water\SDE.ControlValve' does not exist or is not
supported Failed to execute (ExportCAD). Failed at Thu Oct 13 16:46:59
2011 (Elapsed Time: 0.00 seconds)

Why "DataBase Connections" mapped to "Dataset DataBase Connections"?

Best Answer

The problem is occuring, because the script does not know where "DataBase Connections" is. (ArcCatlog/ArcMAP know where it is, and this is why, it works if you use the same syntax within these applications. This is one my pet peeves when working with ArcGIS)

The actual SDE connection file is usually in %appdata%/ESRI/ArcCatlog .. or something similar.

What I usually do, is either give the entire path to the .sde file, or copy the .sde file to some location, and use that path in the script.

For example, I'll copy the .sde file from the above location, to say D:\Con and then use the following script

ExportCAD 'D:\Con\Connection to GIS-WANG.sde\SDE.water\SDE.ControlValve' DWG_R2010 D:\117.DWG Ignore_Filenames_in_Tables Overwrite_Existing_Files
Related Question