Hey Ivan,

Yeah that's what im thinking that id have to access the COM API in ArcGIS 9 to get this accomplished. I don't actually need to read the data in the layers that are included in the document only the name of the layer in the document and the corresponding file/database name for the layer. Im going to give the client dispatcher a try and see what i can hack up to get this done.

Right now im thinking worst case scenario i have to write something in java to do the actual reading of the MXD files until we make the upgrade to ArcGIS 10 (which has the ArcPY module which can read MXD's). Id like to avoid using java if possible to keep the code all python :-P.

Thanks for your help,
Ben



On 9/3/2010 8:36 PM, Lucena, Ivan wrote:
Ben,

There are some interfaces on the ArcObject package that let you not exactly *ready* the MXD but you can get some useful information from the document. I believe that you can access the ArcObject COM API in ArcGIS 10 or 9 by using the win32com.client.Dispatch() the same way as you can load the "esriGeoprocessing.GpDispatch.1". You can use the tools on PythonWin to browse to all the available ArcGIS components.

>>> import win32com.client
>>> arcobj = win32com.client.Dipath("< What should goes here ? >")

It is only a wild guess, I am not even running Windows now to do a quick test, but I hope it would help you.

Ivan

Benjamin Welton wrote:
Can you do that with ArcGIS 9.3? i was under the impression from the doc's/forums that it's only available in the arcpy package in 10.

Ben


On 9/4/2010 5:44 PM, Paolo Corti wrote:
Im wondering if there is any way to read MXD files in ether gdal or some other python based extension. I'm not looking for the raster data for the files only the filename/SDE name of the layer and the name of the layer in the MXD file. Is there any easy way to pull this information out of the MXD?


I think your only option is to use the ArcGis Python library, but you
need a license for doing so

Paolo

_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev



_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to