placeObject
Syntax

PageItem.placeObject(id [, componentId] [, objectType]);
Parameters
id string
The object ID on Studio Server of the object to place.
componentId string (Optional)
The ID of the article component to place. Required when placing a multi-component article to identify which component to place in this frame.
objectType string (Optional)
The type of the object to place (for example "Article", "Image").
Return value
The placeObject() method does not return a value.
Description
The placeObject() method places a Studio Server object in the target page item. The content type of the target frame must match the source object:
- For images, adverts, layout modules, and image article components the content type must be ContentType.GRAPHIC_TYPE.
- For text article components the content type must be ContentType.TEXT_TYPE.
When placing a multi-component article, either the componentId must be provided, or the article must be a single-component article; otherwise the place will fail.
Examples
Place an object by its Studio Server ID
// Place a Studio Server object in the currently selected page item.
app.selection[0].placeObject("6315");
Place a specific component of a multi-component article
// Place a specific article component using its component ID.
app.selection[0].placeObject("6315", "ComponentID123");
Place an object by specifying its type
// Place an image by specifying the object type.
app.selection[0].placeObject("6315", "", "Image");
Supported versions
| Adobe Version | Supported |
|---|---|
| 2023 | ✔ |
| 2024 | ✔ |
| 2025 | ✔ |
| 2026 | ✔ |