---
title: "IUpdateSurfaceOptionsByDefinition Interface"
canonical: https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.iupdatesurfaceoptionsbydefinition.htm
archived: true
applies_to:
  - product: "Customer's Canvas On-Premises"
  - product: "Design Editor"
    versions: ["6.15.0", "6.x (may differ)"]
---

**You’re viewing outdated documentation.** [View the latest Customer’s Canvas On-Premises documentation](https://customerscanvas.com/docs/on-premises/).

# IUpdateSurfaceOptionsByDefinition Interface

**Applies to:** Customer's Canvas On-Premises; Design Editor 6.15.0, 6.x (may differ) · **Archived documentation**
 
A structure holding settings to migrate data when replacing surfaces in a product.
  
You can use this structure in [updateSurfaces](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.product.updatesurfaces.htm.md).
 
 - example
     - ```
var product = await editor.getProduct();
var options = {
    replaceAll: true,
    definition: "7a6ecf23-1286-4e90-8f18-c7c1c77e3cb0",
    surfaces: [0, 1],
    newProductSurfaces: [1, 4]
};

product.updateSurfaces(options);
```
 
## Properties
 
### definition
 
definition: [IProductDefinition](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.iproductdefinition.htm.md)  |  string

A product definition. If this property is a string, then it corresponds to a state file name.
 
### Optional newProductSurfaces
 
newProductSurfaces: number []

An array of surfaces in the new product to be inserted.
 
### Optional preserveSafetyLines
 
preserveSafetyLines: boolean

Inherited from [ISetPrintAreasOptions](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.isetprintareasoptions.htm.md).[preserveSafetyLines](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.isetprintareasoptions.htm.md)

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`.
 
### Optional preserveUserChanges
 
preserveUserChanges: boolean

Inherited from [ISetPrintAreasOptions](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.isetprintareasoptions.htm.md).[preserveUserChanges](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.isetprintareasoptions.htm.md)

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`.
 
### Optional replaceAll
 
replaceAll: boolean

Inherited from [ISetPrintAreasOptions](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.isetprintareasoptions.htm.md).[replaceAll](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.isetprintareasoptions.htm.md)

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`.
 
### Optional surfaces
 
surfaces: number []

An array of surfaces in the current product to be removed.
 
### Optional updateRevertData
 
updateRevertData: boolean

Inherited from [ISetPrintAreasOptions](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.isetprintareasoptions.htm.md).[updateRevertData](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.isetprintareasoptions.htm.md)

If `true`, the new print areas or surfaces are stored as ones to restore when the product is reverted. Otherwise, the previously stored ones are restored on product revert. The default value is `true`.
 
### Optional updateSurfaceSize
 
updateSurfaceSize: boolean

Inherited from [ISetPrintAreasOptions](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.isetprintareasoptions.htm.md).[updateSurfaceSize](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.isetprintareasoptions.htm.md)

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.
