OmniGraffle Animation Script

Hey All,

Wanted to contribute some work I’d done in OmniJS to allow a user to build a sort of ‘animation’ out of complex OmniGraffle files. You have to structure your Graffle to use a layer as an animation frame, since at it’s core all it’s doing is turning one layer on and the previous one off. I’ve created a plugin for it, so paste this into “Animate.omnijs” in your Plugins folder and you should be able to set the following parameters by clicking “Animate”:

  • Delay - In Seconds, how long between steps
    *.Step Size - How many layers to increment (useful if you have a layer of description you want to increment alongside the graph layers)

I hope this helps!
“type”: “action”

 function sleep(x,delay,stepSize) {
 	Timer.once(delay, function(timer){

 function continueExecution(x,delay,stepSize) {
     layerRef[layerSize-x].visible = false;
     while(y<=stepSize) { layerRef[(layerSize-y)-x].visible = true; y++; }
     try {
     	if(x==layerSize){ throw new Error("Done."); }
     catch(e) {

 function reset() {
     while(x>=0) { layerRef[x].visible = false; x--; }

 var _ = function() {

var action = new PlugIn.Action(function(selection) {
	layerRef =[0].selection.canvas.layers;
	layerSize = layerRef.length-2; //Legend never goes off, and count is +1 of total.
	delayForm = new Form();
	delayInput = new Form.Field.String("delay", "Delay", "3");
	stepInput = new Form.Field.String("step", "Step Size", "2");
	prompt = "Delay Time & Step";
	title = "OK";
	formPromise =,title);
	formPromise.then(function (form){
		layerRef[layerSize].visible = true;
		layerRef[layerSize-1].visible = true;
return action;