# `GSNode setPosition:forLayerWidth:`

*Instance Method*

Sets the position in layer coordinates for a layer width.

## Declaration

```swift
func setPosition(_ position: NSPoint, forLayerWidth width: CGFloat)
```

```objc
- (void) setPosition:(NSPoint) position forLayerWidth:(CGFloat) width;
```

```python
setPosition_forLayerWidth_(position: NSPoint, width: float)
```

## Parameters

- `width` — The layer width used for orientation adjustment.

## Discussion

For a node in a path, setting the position registers undo, aligns it to the layer grid, and notifies the path.

## See Also

### Position

- [`GSNode.position`](/Core/GlyphsCore/GSNode/position) — The position in layer coordinates.
- [`GSNode positionForLayerWidth:`](/Core/GlyphsCore/GSNode/positionForLayerWidth:) — The position in layer coordinates for a layer width.
- [`GSNode.positionFast`](/Core/GlyphsCore/GSNode/positionFast) — The position without orientation adjustment.
- [`GSNode setPositionFast:`](/Core/GlyphsCore/GSNode/setPositionFast:) — Sets the position without registering undo or notifying the path.
- [`GSNode setPositionFast:grid:`](/Core/GlyphsCore/GSNode/setPositionFast:grid:) — Sets the unrounded position and rounds the position to a grid without registering undo or notifying the path.
- [`GSNode.positionPrecise`](/Core/GlyphsCore/GSNode/positionPrecise) — The unrounded position in layer coordinates.
- [`GSNode positionPreciseForLayerWidth:`](/Core/GlyphsCore/GSNode/positionPreciseForLayerWidth:) — The unrounded position in layer coordinates for a layer width.
- [`GSNode positionPreciseFast`](/Core/GlyphsCore/GSNode/positionPreciseFast) — The unrounded position without orientation adjustment.
- [`GSNode roundToGrid:`](/Core/GlyphsCore/GSNode/roundToGrid:) — Rounds the position to a grid.
- [`GSNode roundToGridFast:`](/Core/GlyphsCore/GSNode/roundToGridFast:) — Rounds the position to a grid without registering undo or notifying the path.

