# Is there a batchPlay command for core.redrawDocument?

**URL:** https://forums.creativeclouddeveloper.com/t/is-there-a-batchplay-command-for-core-redrawdocument/11594
**Category:** UXP Plugin API
**Tags:** uxp, javascript
**Created:** [December 8, 2025, 7:48am UTC](https://forums.creativeclouddeveloper.com/t/is-there-a-batchplay-command-for-core-redrawdocument/11594 "2025-12-08T07:48:07Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![photonic](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/photonic/32/2513_2.png) [@photonic](https://forums.creativeclouddeveloper.com/u/photonic)
#### Post date: [December 8, 2025, 7:48am UTC](https://forums.creativeclouddeveloper.com/t/is-there-a-batchplay-command-for-core-redrawdocument/11594/1 "2025-12-08T07:48:07Z")

</div>

I’m looking a way to get the next code line:

```auto
await core.redrawDocument({ documentID: app.activeDocument.id });

```

as a batchPlay command JSON object, does anyone knows if there’s a way to make this work with batchPlay?

Thanks!

---

<div class="post-metadata">

### Author: ![Kayrock](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/kayrock/32/4748_2.png) [@Kayrock](https://forums.creativeclouddeveloper.com/u/Kayrock)
#### Post date: [December 10, 2025, 12:04pm UTC](https://forums.creativeclouddeveloper.com/t/is-there-a-batchplay-command-for-core-redrawdocument/11594/2 "2025-12-10T12:04:45Z")

</div>

Is that so you can trigger it in the middle of an array of batch plays? Could you run it as two batches with {synchronousUpdate: true, immediateRedraw: true} as the second parameter of the first batch?

---

<div class="post-metadata">

### Author: ![photonic](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/photonic/32/2513_2.png) [@photonic](https://forums.creativeclouddeveloper.com/u/photonic)
#### Post date: [December 11, 2025, 6:08pm UTC](https://forums.creativeclouddeveloper.com/t/is-there-a-batchplay-command-for-core-redrawdocument/11594/3 "2025-12-11T18:08:54Z")

</div>

The idea is to have it as the last element of the batch array so when batchPlay is run it runs in just that call, avoiding the second call from await core.redrawDocument. But I don’t know if there’s any obj in the batchPlay world that could do this.

---

<div class="post-metadata">

### Author: ![JasonM](https://avatars.discourse-cdn.com/v4/letter/j/3be4f8/32.png) [@JasonM](https://forums.creativeclouddeveloper.com/u/JasonM)
#### Post date: [December 11, 2025, 6:19pm UTC](https://forums.creativeclouddeveloper.com/t/is-there-a-batchplay-command-for-core-redrawdocument/11594/4 "2025-12-11T18:19:11Z")

</div>

> [@photonic](#):
>
> `await core.redrawDocument({ documentID: app.activeDocument.id });`

maybe this?  
`{`  
`_obj: “waitForRedraw”`  
`}`

---

<div class="post-metadata">

### Author: ![photonic](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/photonic/32/2513_2.png) [@photonic](https://forums.creativeclouddeveloper.com/u/photonic)
#### Post date: [December 11, 2025, 9:04pm UTC](https://forums.creativeclouddeveloper.com/t/is-there-a-batchplay-command-for-core-redrawdocument/11594/5 "2025-12-11T21:04:30Z")

</div>

I just tested and not really, or that doesn’t work or is faster to call core.redrawDocument(). I appreciate the help!
