Cacidi Extreme CC Manual

Custom AutoCalc

The Custom AutoCalc production method offers ways to manipulate and place data in the InDesign document in ways that none of the other production methods can do.

AutoCalc Script
The hart in the Custom AutoCalc production method is a special AutoCalc Java script that is fired when the AutoCalc method is started.
Since the AutoCalc method uses such a script it is possible programmably to create any custom data manipulation that is desired and to allocate Item Designs with data in any way. The Custom Script returns four parameters for each data record in order for Cacidi Extreme to correctly place the objects. These are the X- and Y-coordinates for the top-left corner of the Item Design, the name of the Item Design to be placed and the page upon which the design should be placed.
Thus, the Custom Calc method does not use the Page Grid and is in essence a XY Position Placement AutoCalculation with the ability to define rules that will generate the coordinates on the fly.

A CustomCalc example script
The following is a Java Script that is used as a CustomCalc script to load the data, manipulate it and write it back to Cacidi Extreme.

args = app.scriptArgs;

var HeaderData = args.get("HeaderData");
var ProductionData = args.get("ProductionData");

var PositionData="";
var dataLines=ProductionData.split ("\r");
var productionData="";

for (i=1; i<dataLines.length; i++)
//Analyse the data and do some tricks, maybe some manipulating
var dataLineParts=dataLine.split ("\t");

//This is only in my data.. yours could be anywhere
var itemDesign=dataLineParts[19];
//in this demo we just reverse the page position so the first will be the last to place
var pageNumber=13-i;
var positionLine=itemDesign+"\t"+ pageNumber+"\t"+"0.0"+"\t"+"0.0";
//The positionLine ItemDesign, then the Pagenumber, position from left, and the position from the top




//if you manipulate the data set the values

//else set them to ""

Leave a Reply

The Number One Plugin developer for Adobe InDesign