[API](/solutions/geotoolkit/geotoolkit_js/apis/readme) / [geotoolkit](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit) / [flowcharts](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.flowcharts) / [commands](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.flowcharts#commands) / [AddVisual](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.flowcharts#addvisual) / AddVisual

# Class: AddVisual

[commands](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.flowcharts#commands).[AddVisual](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.flowcharts#addvisual).AddVisual

Adds a new visual to the DiagramWidget.

## Implements

- [`ICommand`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.commands.icommand.icommand)


## Table of contents

Constructors
- [new AddVisual(options)](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.flowcharts.commands.addvisual.addvisual.md#new addvisual(options))


Methods
| [execute](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.commands.addvisual.addvisual#execute) | [getClassName](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.commands.addvisual.addvisual#getclassname) | [undo](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.commands.addvisual.addvisual#undo) |
|  --- | --- | --- |
| [getClassName](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.commands.addvisual.addvisual#getclassname-1) |


## Contents

Constructors
#### new AddVisual(options)

• **new AddVisual**(`options`)

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `options` | [`Options`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.flowcharts#addvisual#options) | command options |


Methods
#### execute

▸ **execute**(): `boolean`

Executes the command

#### Returns

`boolean`

true on success, false if not executed

#### Implementation of

[ICommand](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.commands.icommand.icommand).[execute](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.commands.icommand.icommand#execute)

#### getClassName

▸ **getClassName**(): `string`

#### Returns

`string`

#### Implementation of

[ICommand](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.commands.icommand.icommand).[getClassName](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.commands.icommand.icommand#getclassname)

#### undo

▸ **undo**(): `boolean`

Rewinds the command

#### Returns

`boolean`

true on success, false if couldn't be undone

#### Implementation of

[ICommand](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.commands.icommand.icommand).[undo](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.flowcharts.commands.icommand.icommand#undo)

#### getClassName

▸ `Static` **getClassName**(): `string`

#### Returns

`string`