var sketch = context.api() var document = sketch.selectedDocument; var selection = document.selectedLayers; var command = context.command; var selectedLayer = context.document.selectedLayers().firstLayer() command.setValue_forKey_onLayer_forPluginIde