# `GSGlyph compatibleLayerGroupIdsForLayer:`

*Instance Method*

The identifiers of layers in the same group that have compatible shapes, anchors, and path-component hints.

## Declaration

```swift
func compatibleLayerGroupIds(for layer: GSLayer) -> [String]?
```

```objc
- (NSArray<NSString *> *) compatibleLayerGroupIdsForLayer:(GSLayer *) layer;
```

```python
compatibleLayerGroupIdsForLayer_(layer: GSLayer) -> list[str]
```

## Parameters

- `layer` — A layer belonging to the glyph.

## Discussion

Layers without shapes or a background image do not participate in the grouping. Returns `nil` for a background layer or a layer that is not in a group.

## See Also

### Layer Groups

- [`GSGlyph layerGroups`](/Core/GlyphsCore/GSGlyph/layerGroups) — The layer identifier groups used to check compatibility and coordinate edits across corresponding layers.
- [`GSGlyph layerGroupsInstances:masters:ignoreEmptyLayers:error:`](/Core/GlyphsCore/GSGlyph/layerGroupsInstances:masters:ignoreEmptyLayers:error:) — The layer identifier groups required by a set of instances.
- [`GSGlyph forcedLayerGroupIdsSeenLayers:ignoreEmptyLayers:`](/Core/GlyphsCore/GSGlyph/forcedLayerGroupIdsSeenLayers:ignoreEmptyLayers:) — The layer identifier groups formed without reference to configured instances.
- [`GSGlyph layerGroupIDSetForLayer:`](/Core/GlyphsCore/GSGlyph/layerGroupIDSetForLayer:) — The forced layer group containing a layer, or `nil` when the layer is not in a group.
- [`GSGlyph layerGroupIDSetForLayer:ignoreEmptyLayers:`](/Core/GlyphsCore/GSGlyph/layerGroupIDSetForLayer:ignoreEmptyLayers:) — The forced layer group containing a layer, or `nil` when the layer is not in a group.
- [`GSGlyph layerGroupIDsForLayer:`](/Core/GlyphsCore/GSGlyph/layerGroupIDsForLayer:) — The forced layer group containing a layer as an array, or `nil` when the layer is not in a group.
- [`GSGlyph collectBraceLayerIDsMasters:allKeys:`](/Core/GlyphsCore/GSGlyph/collectBraceLayerIDsMasters:allKeys:) — The font masters including representations of active Intermediate-layer locations.

