I have some code that creates smart glyphs. Setting layer.smartComponentPoleMapping does not seem to work, the checkboxes in the dialog remain unchceked. I had to use the low level layer.setPartSelection_():
layer.setPartSelection_(NSMutableDictionary.dictionaryWithObject_forKey_(NSNumber.numberWithInt_(1), axis.id))