This is related to the following Retain ESRI symbology in Mapinfo TAB . As an initial step (in arcpy) I want to access the symbology of all the datasets and create a document which has the details of the symbology as per the graphic below.
Is this possible (should I invest the time to work it out) or if it isn't possible I will just have to get cracking on doing it manually on hundreds of MXD's (:-
To break down the steps -hopefully I can automate at least part of the process.
scrolling through mxd's and getting the datasets that are on is no problem
lyrFile = arcpy.mapping.Layer if lyrFile.visible == True:
as it finds a dataset it should create a .lyr file (as most are just shp/gdb files) and then AttribXXX=lyrFile.xxx
where XXX and xxx are
BRIGHTNESS = lyrFile.brightness
(above format to following)
CONTRAST —contrast
DATASETNAME —datasetName
DATASOURCE —dataSource
DESCRIPTION —description
LABELCLASSES —labelClasses
LONGNAME —longName
NAME —name
SHOWLABELS —showLabels
TRANSPARENCY —transparency
WORKSPACEPATH —A layer's workspace or connection file path
The issue is I can't find anything that gets the RGB, line/point/polygon type, line weights, font etc. If these can be found then the next step
write each of the values above to a CSV (easy)...for example (this has to be expanded)
f = open(origPath+'\\LayerAtrributes_LOG.txt', 'a') f.write(str(DATASETNAME)+","+str(DATASOURCE)+","+str(DESCRIPTION)+","+str(MXDName)+"\n") f.close()
If possible a jpg of the symbology should be produced as in the example and the link to it added to the csv.
Am is asking to much of arcpy?