Select to view content in your preferred language

Adding new labelClass for layer

311
0
07-08-2011 05:27 AM
ArkadiuszMatoszka
Frequent Contributor
Is there any way to add new labelClass for layer in python?
layer.labelCasses ruturns python list of labelClasses, but how create new instance of labelCalss?
I tried to make a copy of existing class, make some changes (className, expresion etc.) and append to layer.labelClasses, but it doesn't work (instead of append it overwrites copied class).
Also tried to create new list of classes and replace oryginal list with:
layer.labelClasses = new_list
But as a resulst layer.labelClasses was empty list (new_list wasn't)
Any ideas?
Cheers.
Tags (2)
0 Kudos
0 Replies