# Class: oElement

## $. oElement

$.oElement Class

#### new $.oElement(id, oColumnObject)

openHarmony/openHarmony_element.js, line 62
  The base class for the $.oElement.
  Elements hold the drawings displayed by a "READ" Node or Drawing Node. They can be used to create new drawings, rename them, etc.

  Name | Type | Description
  --- | --- | ---
  `id` | int | The element ID.
  `oColumnObject` | $.oColumn | The column object associated to the element.

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `id` | int | The element ID.
  `oColumnObject` | $.oColumn | The column object associated to the element.

### Members

#### drawingsArray.<$.oDrawing>

  The drawings available in the element.

#### formatstring

  The file format of the element.

#### namestring

  The name of the element.

#### palettesArray.<$.oPalette>

  The palettes linked to this element.

#### pathstring

  The folder path of the element on the filesystem.

### Methods

#### addDrawing(atFrame, name, filename){$.oDrawing}

openHarmony/openHarmony_element.js, line 158
  Adds a drawing to the element. Provide a filename to import an external file as a drawing.

  Name | Type | Description
  --- | --- | ---
  `atFrame` | int | optional The frame at which to add the drawing on the $.oDrawingColumn. Values < 1 create no exposure.
  `name` | name | optional The name of the drawing to add.
  `filename` | string | optional The filename for the drawing to add.

  ##### Returns:

  Type | Description
  --- | ---
  $.oDrawing | The added drawing

#### duplicate(name){$.oElement}

openHarmony/openHarmony_element.js, line 240
  Duplicate an element.

  Name | Type | Description
  --- | --- | ---
  `name` | string | optional The new name for the duplicated element.

  ##### Returns:

  Type | Description
  --- | ---
  $.oElement | The duplicate element

#### getDrawingByName(name){$.oDrawing}

openHarmony/openHarmony_element.js, line 188
  Gets a drawing object by the name.

  Name | Type | Description
  --- | --- | ---
  `name` | string | The name of the drawing to get.

  ##### Returns:

  Type | Description
  --- | ---
  $.oDrawing | The drawing found by the search

#### linkPalette(oPaletteObject, listIndex){$.oPalette}

openHarmony/openHarmony_element.js, line 199
  Link a provided palette to an element as an Element palette.

  Name | Type | Description
  --- | --- | ---
  `oPaletteObject` | $.oPalette | The oPalette object to link
  `listIndex` | int | optional The index in the element palette list at which to add the newly linked palette

  ##### Returns:

  Type | Description
  --- | ---
  $.oPalette | The linked element palette.

#### unlinkPalette(oPaletteObject)

openHarmony/openHarmony_element.js, line 214
  If the palette passed as a parameter is linked to this element, it will be unlinked, and moved to the scene palette list.

  Name | Type | Description
  --- | --- | ---
  `oPaletteObject` | $.oPalette |