Created
April 24, 2012 17:50
-
-
Save wboykinm/2481975 to your computer and use it in GitHub Desktop.
Export ArcGIS Symbology
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from vb2py.vbfunctions import * | |
def UVRtoRGB(): | |
pRGB = RgbColor() | |
pMxDoc = ThisDocument | |
pGeoFtrLyr = pMxDoc.FocusMap.Layer(0) | |
pUVRend = pGeoFtrLyr.Renderer | |
VBFiles.openFile(1, OUTPUT_FILE, 'w') | |
VBFiles.writeText(1, 'Value,Red,Green,Blue', '\n') | |
for f in vbForRange(0, pUVRend.ValueCount - 1): | |
sVal = pUVRend.Value(f) | |
pFillSym = pUVRend.Symbol(sVal) | |
pRGB.RGB = pFillSym.Color.RGB | |
VBFiles.writeText(1, sVal, ',', CStr(pRGB.Red), ',', CStr(pRGB.Green), ',', CStr(pRGB.Blue), '\n') | |
VBFiles.closeFile(1) | |
MsgBox('RGBs Exported', vbInformation) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment