# `GSFont addMasterFromInstance:error:`

*Instance Method*

Adds the generated contents of an instance as a new local master.

## Declaration

```swift
func addMaster(from instance: GSInstance) throws
```

```objc
- (BOOL) addMasterFromInstance:(GSInstance *) instance error:(NSError **) error;
```

```python
addMasterFromInstance_error_(instance: GSInstance) -> tuple[bool, NSError]
```

## Parameters

- `error` — On output, a pointer to an error object that describes why the method failed, or `nil` if no error occurred. If you are not interested in the error information, pass `nil` for this parameter.

## Return Value

`YES` if the instance could be generated and added.

## See Also

### Master Content

- [`GSFont addFontMasterAndContent:`](/Core/GlyphsCore/GSFont/addFontMasterAndContent:) — Adds a local master and copies the content associated with it into the font.
- [`GSFont insertFontMasterAndContent:atIndex:`](/Core/GlyphsCore/GSFont/insertFontMasterAndContent:atIndex:) — Inserts a local master and copies the content associated with it into the font.
- [`GSFont removeFontMasterAndContent:`](/Core/GlyphsCore/GSFont/removeFontMasterAndContent:) — Removes a local master and the layer content associated with it.
- [`GSFont replaceFontMasterAtIndex:withFontMaster:`](/Core/GlyphsCore/GSFont/replaceFontMasterAtIndex:withFontMaster:) — Replaces a local master at an index without changing layer content.
- [`GSFont copyGlyphs:sourceFontMasterID:targetFontMasterID:addMissing:`](/Core/GlyphsCore/GSFont/copyGlyphs:sourceFontMasterID:targetFontMasterID:addMissing:) — Copies glyph layers associated with one master identifier to another master identifier.
- [`GSFont copyLayersFrom:sourceFontMasterID:targetFontMasterID:`](/Core/GlyphsCore/GSFont/copyLayersFrom:sourceFontMasterID:targetFontMasterID:) — Copies layers associated with one master identifier to another master identifier.
- [`GSFont copyInfoFrom:sourceFontMasterID:targetFontMasterID:`](/Core/GlyphsCore/GSFont/copyInfoFrom:sourceFontMasterID:targetFontMasterID:) — Copies master-specific font information from one master identifier to another master identifier.
- [`GSFont addFontAsNewMaster:`](/Core/GlyphsCore/GSFont/addFontAsNewMaster:) — Adds a master from another font as a new local master.

