Get Started
Plugins
Macros
More information

window.Asc.plugin.executeMethod ("ChangeOleObjects", [args], callback)

Description

Defines the method that allows changing multiple OLE objects with the InternalIds specified in OLE object data.

Usage

This method should be used in the following way:

window.Asc.plugin.executeMethod ("ChangeOleObjects", [arrObjectData]);
Parameters
Parameter Description Type Example
arrObjectData An array of OLE object data which contains the following parameters:
  • Data - OLE object data (internal format),
    type: string,
    example: "{data}";
  • ImageData - an image in the base64 format stored in the OLE object and used by the plugin,
    type: string,
    example: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6";
  • ApplicationId - an identifier of the plugin which can edit the current OLE object and must be of the asc.{UUID} type,
    type: string,
    example: "asc.{38E022EA-AD92-45FC-B22B-49DF39746DB4}";
  • InternalId - the OLE object identifier which is used to work with OLE object added to the document,
    type: string,
    example: "5_556";
  • ParaDrawingId - an identifier of the drawing object containing the current OLE object,
    type: string,
    example: "1_713";
  • Width - the OLE object width measured in millimeters,
    type: number,
    example: 70;
  • Height - the OLE object height measured in millimeters,
    type: number,
    example: 70;
  • WidthPix - the OLE object image width in pixels,
    type: number,
    example: 60 * 36000;
  • HeightPix - the OLE object image height in pixels,
    type: number,
    example: 60 * 36000.
array of objects
Returns

The method returns the undefined value.

Example
window.Asc.plugin.executeMethod("ChangeOleObjects", [[{"Data": "{data}", "ImageData": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6", "ApplicationId": "asc.{38E022EA-AD92-45FC-B22B-49DF39746DB4}", "InternalId": "5_556", "ParaDrawingId": "1_713", "Width": 70, "Height": 70, "WidthPix": 60 * 36000, "HeightPix": 60 * 36000}]]);