Slides API edit shapes

121 views
Skip to first unread message

Brett Grear

unread,
Jan 29, 2022, 3:50:22 PM1/29/22
to Google Apps Script Community
Hi all,

I am creating Slides using the Slides API as I need a way to copy one slide to another presentation programmatically and there is no way to do that.

Part of my slide includes speech bubbles (WEDGE_ROUND_RECTANGLE_CALLOUT) to be exact.  I am able to insert these fine using the API and can get them to be the correct size and location.

My question is, is there any way to stipulate where I would like the speech pointer to go? Indicated by the yellow square down the bottom.  Using the Slides Editor you can drag it to be where ever you like but there doesn't seem to be a way to do this using the API.

This question is specifically about this shape but it could easily be expanded to include any customisable shapes.

Thanks in advance.

Screenshot 2022-01-29 20.48.07.png

Brett

Clark Lind

unread,
Jan 30, 2022, 10:00:05 AM1/30/22
to Google Apps Script Community
I don't know if you can with built-in methods. I opened the browser Dev Tools while manipulating one of these call-outs. They are SVGs, and when you move the speech pointer, it just redraws the path inside the SVG. Even with the advanced API, I don't know that you will have that level of access (down the the SVG manipulation level). At that level, you may as well create your own Slide API and compete with Google ;) 
An alternative hack might be to simply create 4 "speech arrow" images (one for each side), and just use text boxes instead of callouts. Then insert your Speech arrow wherever you wish.

Borislav Sirakov

unread,
Jan 30, 2022, 1:38:30 PM1/30/22
to google-apps-sc...@googlegroups.com
--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/7f36228e-f524-46c0-8e1e-9e7c1cc65008n%40googlegroups.com.

Kos

unread,
Jan 30, 2022, 1:46:57 PM1/30/22
to Google Apps Script Community
"Star" this feature request: https://issuetracker.google.com/issues/36761705 You may also describe your use case there in comments.

Brett Grear

unread,
Jan 31, 2022, 5:45:01 AM1/31/22
to Google Apps Script Community
That is a good idea regarding 'speech arrows'. I'll look into it.
I didn't think there was a way but the API is quite involved so I thought I would ask in case I missing something.

I have starred the issue regarding copying Slides in the mean time.

Clark Lind

unread,
Jan 31, 2022, 10:50:17 AM1/31/22
to Google Apps Script Community
After I sent that, I realized you might be able to insert a triangle shape of whatever dimensions you wish instead of an image :)
Reply all
Reply to author
Forward
0 new messages