Timeline for Using ArcPy to get layer symbology?
Current License: CC BY-SA 3.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 5, 2018 at 13:53 | comment | added | panda | @MichaelJackson I use the symbology property but it seems it's not supported in all the cases, like when the layer uses more than one field for symbology. I need to get the names of the fields used, but I can't find a method. | |
Sep 4, 2018 at 16:51 | comment | added | M J | @panda This is an old answer. Are you using version higher than 10.0? If yes, see answer below about the symbology property of the layer object. | |
Aug 30, 2018 at 7:26 | comment | added | panda |
@MichaelJackson In your code, I have only replaced the mxd path. But I got an error at the ` lyr.symbologyFieldName = symbologyElement.getElementsByTagName(self.LYR_FIELD_NODE)[0].childNodes[0].nodeValue` line, sayying list index out of range . this is because the symbologyElement.getElementsByTagName(self.LYR_FIELD_NODE) is empty. But why is it empty? I assumed that this is an alternative to the lyr.symbology method, but it still doesn't work.
|
|
Apr 24, 2018 at 1:58 | comment | added | jpmc26 |
Use a context manager for that zip file: with zipfile.ZipFile(msdPath) as zz: .
|
|
Oct 26, 2012 at 20:42 | history | edited | M J | CC BY-SA 3.0 |
added 17 characters in body
|
Feb 1, 2012 at 18:27 | history | edited | CaptDragon | CC BY-SA 3.0 |
code format
|
Feb 1, 2012 at 17:43 | history | edited | M J | CC BY-SA 3.0 |
added 45 characters in body
|
Feb 1, 2012 at 5:21 | history | edited | M J | CC BY-SA 3.0 |
added 230 characters in body
|
Feb 1, 2012 at 5:10 | history | answered | M J | CC BY-SA 3.0 |