Export layers as different images for keynote?

I’m interested in using layers functionality to gradually build up images for a slide deck in Keynote. Ideally this would be a series of images, adding one layer at a time.

For example:

image1: layer 1
image2: layer 1 & 2
image3: layer 1,2,3


Is this possible? Happy to use alternatives if this is a bad idea.

Sure, that works.

I use multiple canvases all the time for the same reason. Have your tried yet? Any specific issues you are having?

For the drawings I use the basic approach is to draw the complete “thing” (final drawing). I then duplicate a canvas placed above the final one in the list, removing what I want. Then duplicate again and remove. Etc. Etc. So it’s a backwards design approach: create final image first, create first image last. As it turns out that’s just easier/quicker for me. But I don’t see any reason the layers approach shouldn’t work if you prefer that approach.

Well, the problem with the approach you listed is that if I want to change a single piece of my diagram I’d need to rework all the other images as well.

I suppose what I’m really after is to be able to do my layers & have the export be automated in a way so that exporting 2 images is the same amount of work as exporting 20. Making a change to the final diagram should not mean I need to redo the same change on 20 different layers / canvases.

Understood. I’ve always finalized my final image before creating multiple canvases. So in practice I don’t run into that problem.

It seems the layers approach would work better for you, however. I guess what I’m not understanding is what’s the real issue you can’t solve? If it’s automating export, then I can’t help. There are some good applescripters on this forum. But even when I’ve done 12 build-up images that takes me all of 60 seconds to do the “hard way” in terms of exporting. Never made a whole lot of sense to me to learn how to do this via Applescript when it would mean a net loss of time for me! But if you do this a lot (i.e. more than once a month) than finding a good scriptable way to do this probably makes sense.

Have you considered using Shared Layers? Each step of your build can be on a separate Shared Layer, so a change to one makes the same change to all.

@rustyrazorblade did you ever work out a solution here?

The answer is given.
What precisely do you not understand, what do you need help with ?

Howdy! I’m looking for an efficient way to gradually build up complex diagrams in a slide show.

The shared layers approach doesn’t work for me because (it seems) you can’t have connectors between objects that are in different shared layers (works fine with normal layers). This issue aside, this approach requires setting up the canvases which is unnecessary busy work.

I suspect a scripting solution that iteratively exports with different layers visible will be the solution, just curious if ole rusty figured it out already so I don’t have to :)

Yes, SharedLayers are hopeless.

I do this kind of work regularly, using ordinary Layers (as per the first few posts). I am with @mitchellm, I do not need a script.

No. Read the posts carefully. You must have the concept, The Logical in your head. The steps are for drawing The Physical. Draw it in its finished form, once, on one Canvas. When it is ready, duplicate the Canvas and delete one layer, iteratively.

@draft8 is our resident scribe. If there were a script, it would be posted in this thread.

Personally, I would not take the time to right a script for this purpose: too finicky because my Layers are carefully named (required for construction), and I would have to iterate through Layers.


I think I do understand the process you described; that still involves manually (“iteratively”) duplicating and deleting. By the way, take this or leave it, but the tone in this message came across as really condescending to me. Thanks for taking the time to help though :)

Fortunately I found that someone actually has already written the script. It works perfectly! https://omni-automation.com/shortcuts/shortcut-og-export-layers-to-keynote.html

Thank you.


I do not duplicate anything,

A further explanation may be necessary. Say I have 3 steps in the finished doc (Keynote or GIF sequence), with 5 Shapes in each step.

In the finished doc:

  • I have 3 Layers, with nothing duplicated, each Layer has only the items that I wish to show in the specific step:
    • step 1 = 5 rectangles
    • step 2 = 5 circles
    • step 3 = 5 diamonds.

In the construction:

  • I have one Canvas. I do not need more than one Canvas.
  • I start with one Layer [L0-All], I draw 5 rectangles; 5 circles; 5 diamonds, set all properties for each, position them as I want them to appear in the final doc, set the connecting lines, etc
    • Layer [L0-All] is to remain intact, I want that to remain unchanged, complete, all objects and connections, so that I can change the set of slides in the future
  • when the construction is complete:
    • duplicate Layer [L0-All] creating [L1-Rectangle], remove the circles, remove the diamonds
    • duplicate Layer [L0-All] creating [L2-Circle], remove the rectangles, remove the diamonds
    • duplicate Layer [L0-All] creating [L3-Diamond], remove the rectangles; remove the circles
    • hide all Layers
  • when displaying (export 3 PDFs or copy-paste into Keynote or whatever)
    • step 1: Show Layer [L1-Rectangle]
    • step 2: additionally Show Layer [L2-Circle]
    • step 3: additionally Show Layer [L3-Diamond]

I do not duplicate anything, A thing that has an integral requirement eg Layer [L0-All] is not a duplicate.

I appreciate that your method of creating/duplicating/deleting objects in the Layers may be different to mine, the Layers may be simpler, and thus (eg) the objects are in fact duplicated. That is, your Layers are cumulative, my Layers are not cumulative, they are atomic.

The Script

Separate point.

The script is great. But I do not understand how the above steps can be eliminated, you still have to create (eg) 3 Layers, before you use the script.

That is to say, the script exports Layers that have been correctly created for the purpose, it does not create the required Layers from the construction. So I do not understand how the …

… is eliminated.


Hi again! Regarding duplication, I was just responding to this line

When it is ready, duplicate the Canvas and delete one layer, iteratively.

And then later in your description you say “duplicate Layer” several times… so I’m a bit confused what you mean by not duplicating anything. Perhaps you mean that the final product has no duplicated elements?

In any case, I think I may have discovered an easier way to accomplish what you have described. Like you, I start by creating the final product. But then I would do the following:

  • select rectangles, right click on one, select “New Layer from Selection”
  • select circles, right click on one, select “New Layer from Selection”
  • select diamonds, right click on one, select “New Layer from Selection”

The result is three layers, one with only rectangles, one with only circles, and one with only diamonds. Note: It’s somewhat more intuitive to do it in reverse because then you see the stages as you are producing them, but then you have to reorder all the layers because you need the final build to be on top.

Then you could follow the “when displaying” step as you described. I use the script here though. This is the step that the script automates: exporting several pdfs/pngs with each layer added. You are correct that the script does not automate the layer construction step.

The word duplicate, like the action in the OG menu [Duplicate Canvas] or the Apple Menu [Duplicate File], means duplicate whatever is selected.

  • That is an action.

  • The context is the construction of a diagram, within which one performs low-level actions, which has the goal of a finished product.

  • First, in neither of those actions does one end up with a duplicate (eg. duplicates are prevented by principle [except in OG of course] ).

  • Second, the intention one has, is to duplicate something and then change it, thus the content is also not a duplicate.

You may be confused by considering the low-level actions while ignoring the context, the higher level purpose and intent. I did not say that I do not duplicate anything at any time, which is evidently what you thought I meant.

Yes. I took it for granted that the reader would understand that from the detailed steps I gave.

As I stated, the script is great.

  • I can see how it would work for Layers that are cumulative (each containing Shapes duplicated in previous Layers).
  • I do not see how it could work for my Layers (no duplicate Shapes; integral; not cumulative).

When a Shape overlays another (that is in a lower Layer), colours less than 100% opacity would also be a problem.

Last but not least, my diagrams are a bit intense, and the Layers are carefully constructed from the final slide (done first, as you do), for the specific sequence of steps to be presented.

  • Eg. due to the non-duplication principle, I may have a Layer that is shown in step (3; 5; 9) only.
  • Eg. in the lecture version, this simple final slide is shown in 8 presentation steps; 8 lecture slides.