# `GSLayer setAttributeFast:forKey:`

*Instance Method*

Sets an attribute without registering undo or notifying the glyph.

## Declaration

```swift
func setAttributeFast(_ value: Any, forKey key: GSLayerAttribute)
```

```objc
- (void) setAttributeFast:(id) value forKey:(GSLayerAttribute) key;
```

```python
setAttributeFast_forKey_(value: object, key: GSLayerAttribute)
```

## See Also

### Attributes

- [`GSLayer.attributes`](/Core/GlyphsCore/GSLayer/attributes) — Values that configure layer behavior and special layer formats.
- [`GSLayer countOfAttributes`](/Core/GlyphsCore/GSLayer/countOfAttributes) — The number of attributes.
- [`GSLayer attributeForKey:`](/Core/GlyphsCore/GSLayer/attributeForKey:) — The value for an attribute key, or `nil` if no value is set.
- [`GSLayer setAttributesFast:`](/Core/GlyphsCore/GSLayer/setAttributesFast:) — Replaces all attributes without registering undo or notifying the glyph.
- [`GSLayer setAttribute:forKey:`](/Core/GlyphsCore/GSLayer/setAttribute:forKey:) — Sets or removes an attribute.
- [`GSLayer removeAttributeForKey:`](/Core/GlyphsCore/GSLayer/removeAttributeForKey:) — Removes an attribute.

