---
title: "IUpdateSurfacesCmdArgs | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-interfaces/IUpdateSurfacesCmdArgs/"
---

# IUpdateSurfacesCmdArgs

> Surface insertion mode.

## Enumerations

### UpdateSurfaceBehavior

#### Remarks

You can use this structure in Product.updateSurfaces\|updateSurfaces.

#### Enumeration Members

| Enumeration Member | Value | Description |
| ------ | ------ | ------ |
|  `changeSurfaceLength` | `"changeSurfaceLength"` | First deletes all the surfaces of the loaded product and then takes the pages from the new product. |
|  `keepCurrentSurfaceLength` | `"keepCurrentSurfaceLength"` | The number of pages remains the same, and the sizes of the `surfaces` and `newProductSurfaces` arrays must match. |

## Interfaces

### ISetPrintAreasOptions

#### Extended by

- [`IUpdateSurfaceOptions`](#iupdatesurfaceoptions)

#### Properties

##### clearRemovedItems?

```ts
optional clearRemovedItems?: boolean;
```

If true, clears user-deleted items after merging

##### preserveSafetyLines?

```ts
optional preserveSafetyLines?: boolean;
```

If `true`, the current safety lines, if any, are restored in new print areas. If `false`, safety lines from new print areas are applied. The default value is `true`.

##### preserveUserChanges?

```ts
optional preserveUserChanges?: boolean;
```

If `true`, the changes made by a user are restored in the new print areas or surfaces if it is possible. Otherwise, all changes made by the user are wiped. The default value is `true`.

##### replaceAll?

```ts
optional replaceAll?: boolean;
```

If `true`, design elements whose names do not match move to the new print area in a random order according to their types. If `false`, only design elements with the same names are moved to the new print area. The default value is `false`.

##### updateSurfaceSize?

```ts
optional updateSurfaceSize?: boolean;
```

If `true`, changes the surface size to match the new print area or surface. If it's `false` and a mockup is defined, then the surface size remains unchanged. By default, `updateSurfaceSize` is `false`, and the surface size changes only if no mockups are specified.

***

### IUpdateSurfaceOptions

#### Extends

- [`ISetPrintAreasOptions`](#isetprintareasoptions)

#### Type Parameters

| Type Parameter |
| ------ |
| `TProduct` |

#### Properties

##### clearRemovedItems?

```ts
optional clearRemovedItems?: boolean;
```

If true, clears user-deleted items after merging

###### Inherited from

[`ISetPrintAreasOptions`](#isetprintareasoptions).[`clearRemovedItems`](#clearremoveditems)

##### newProductSurfaces?

```ts
optional newProductSurfaces?: number[];
```

An array of surfaces in the new product to be inserted.

##### preserveSafetyLines?

```ts
optional preserveSafetyLines?: boolean;
```

If `true`, the current safety lines, if any, are restored in new print areas. If `false`, safety lines from new print areas are applied. The default value is `true`.

###### Inherited from

[`ISetPrintAreasOptions`](#isetprintareasoptions).[`preserveSafetyLines`](#preservesafetylines)

##### preserveUserChanges?

```ts
optional preserveUserChanges?: boolean;
```

If `true`, the changes made by a user are restored in the new print areas or surfaces if it is possible. Otherwise, all changes made by the user are wiped. The default value is `true`.

###### Inherited from

[`ISetPrintAreasOptions`](#isetprintareasoptions).[`preserveUserChanges`](#preserveuserchanges)

##### product

```ts
product: TProduct;
```

##### replaceAll?

```ts
optional replaceAll?: boolean;
```

If `true`, design elements whose names do not match move to the new print area in a random order according to their types. If `false`, only design elements with the same names are moved to the new print area. The default value is `false`.

###### Inherited from

[`ISetPrintAreasOptions`](#isetprintareasoptions).[`replaceAll`](#replaceall)

##### surfaces?

```ts
optional surfaces?: number[];
```

An array of surfaces in the current product to be removed.

##### updateBehavior?

```ts
optional updateBehavior?: UpdateSurfaceBehavior;
```

Defines how new surfaces will replace existing surfaces in the product. If `changeSurfaceLength`, removes all pages in the product and replaces them with pages of the new product.

##### updateSurfaceSize?

```ts
optional updateSurfaceSize?: boolean;
```

If `true`, changes the surface size to match the new print area or surface. If it's `false` and a mockup is defined, then the surface size remains unchanged. By default, `updateSurfaceSize` is `false`, and the surface size changes only if no mockups are specified.

###### Inherited from

[`ISetPrintAreasOptions`](#isetprintareasoptions).[`updateSurfaceSize`](#updatesurfacesize)
