# `GSLayer attributesDict:`

*Instance Method*

An attribute representation for the specified Glyphs file format version.

## Declaration

```swift
func attributesDict(_ format: GSFormatVersion) -> [GSLayerAttribute : Any]
```

```objc
- (NSDictionary<NSString *,id> *) attributesDict:(GSFormatVersion) format;
```

```python
attributesDict_(format: GSFormatVersion) -> dict[str, object]
```

## Parameters

- `format` — The Glyphs file format version for which to encode the attributes.

## Discussion

The representation converts axis identifiers and fills values required by older formats.

## See Also

### Encoding

- [`GSLayer propertyListValueFormat:error:`](/Core/GlyphsCore/GSLayer/propertyListValueFormat:error:) — A property-list representation for the specified Glyphs file format version.
- [`GSLayer saveToFile:format:context:error:`](/Core/GlyphsCore/GSLayer/saveToFile:format:context:error:) — Writes the layer in the specified Glyphs file format.
- [`GSLayer.readBuffer`](/Core/GlyphsCore/GSLayer/readBuffer) — Values deferred until the layer can complete format-dependent decoding.
- [`GSLayer setReadBuffer:forKey:`](/Core/GlyphsCore/GSLayer/setReadBuffer:forKey:) — Stores a value for format-dependent decoding after the layer hierarchy is available.
- [`GSLayer postRead:format:`](/Core/GlyphsCore/GSLayer/postRead:format:) — Completes format-dependent decoding after the layer has been attached to its object hierarchy.
- [`GSLayer layerDataFromDict:format:error:`](/Core/GlyphsCore/GSLayer/layerDataFromDict:format:error:) — Encodes layer elements as Glyphs property-list data.

