# `GSLayer getCopyOfContentFromLayer:doSelection:`

*Instance Method*

Copies shapes, hints, anchors, and optionally selected nodes from another layer.

## Declaration

```swift
func getCopyOfContent(from shadowLayer: GSLayer, doSelection: Bool)
```

```objc
- (void) getCopyOfContentFromLayer:(GSLayer *) shadowLayer doSelection:(BOOL) doSelection;
```

```python
getCopyOfContentFromLayer_doSelection_(shadowLayer: GSLayer, doSelection: bool)
```

## Parameters

- `doSelection` — Whether selected nodes should be mapped from the source layer to the copied shapes.

## See Also

### Shapes

- [`GSLayer.shapes`](/Core/GlyphsCore/GSLayer/shapes) — An array of the shape objects defining the visual part of the layer.
- [`GSLayer setShapesFast:`](/Core/GlyphsCore/GSLayer/setShapesFast:) — Replaces the shapes without undo registration or KVO notifications.
- [`GSLayer setShapes:hints:`](/Core/GlyphsCore/GSLayer/setShapes:hints:) — Replaces the shapes and hints together.
- [`GSLayer countOfShapes`](/Core/GlyphsCore/GSLayer/countOfShapes) — The number of shapes in the layer.
- [`GSLayer indexOfObjectInShapes:`](/Core/GlyphsCore/GSLayer/indexOfObjectInShapes:) — Returns the linear shape index of a shape.
- [`GSLayer objectInShapesAtIndex:`](/Core/GlyphsCore/GSLayer/objectInShapesAtIndex:) — Returns the shape at the given linear shape index.
- [`GSLayer objectInShapesAtIndexFast:`](/Core/GlyphsCore/GSLayer/objectInShapesAtIndexFast:) — Returns the shape at the given linear shape index without locking.
- [`GSLayer clear`](/Core/GlyphsCore/GSLayer/clear) — Removes shapes, anchors, hints, and selection from the layer.

