updateGeometry
Syntax

app.updateGeometry(layoutId);
Parameters
layoutId string
The ID of the layout that contains the updated geometry information.
Return value
The updateGeometry() method does not return a value.
Description
The updateGeometry() method applies a pending geometry update to an open InCopy document. It locates the open document that matches the given layout id and applies the geometry update if one is available. In case of failure it throws an exception. This method is typically used inside the afterGeometryNotification scripting event handler.
Examples
Apply a geometry update when notified
// Apply the geometry update for the layout that triggered the notification.
var layoutId = "12345";
app.updateGeometry(layoutId);
Use in a try-catch block to handle errors
// Apply the geometry update and handle any errors.
var layoutId = "12345";
try {
app.updateGeometry(layoutId);
} catch (e) {
alert("Failed to update geometry: " + e.message);
}
Supported versions
| Adobe Version | Supported |
|---|---|
| 2023 | ✔ |
| 2024 | ✔ |
| 2025 | ✔ |
| 2026 | ✔ |