How to get Workspace size in CS6
Hi. I cannot get the dimensions of the Workspace in CS6. Does anyone have any idea how to find out the dimensions?
I understand that it should be 16384 to 16384 on CS6. But how can I get the location of this area relative to the coordinate grid in the current file?

To get the dimensions of the workspace in CC, I use catching an exception when creating an artboard outside of the workspace. But in CS6 no exception is thrown.
MaiFuncs.getWorkspaceSize = function(){
var doc = app.activeDocument;
var res = {};
var step = 1000;
res.x_min = this.getWorkspaceCoord(-16000, step, "x");
res.x_max = this.getWorkspaceCoord(16000, -step, "x");;
res.y_min = this.getWorkspaceCoord(-16000, step, "y");;
res.y_max = this.getWorkspaceCoord(16000, -step, "y");;
return res;
}
MaiFuncs.getWorkspaceCoord = function(start, delta, coord) {
var artboards = app.activeDocument.artboards;
var aIndex = artboards.getActiveArtboardIndex();
var repeat = true;
var artboard;
while (repeat) {
try {
repeat = false;
var rect;
if (coord == "x")
rect = [start, 0, start+1, -1];
else
rect = [0 , start, 1, start-1];
artboard = artboards.add(rect);
}
catch (err) {
start = start+delta;
repeat = true;
}
}
artboard.remove();
artboards.setActiveArtboardIndex(aIndex);
return start;
}Is there another way to get the dimensions of the Workspace?
