Quantcast
Channel: Adobe Community : Popular Discussions - Illustrator Scripting
Viewing all articles
Browse latest Browse all 12845

[Illustrator CS5.1] How to create customised argument for artboards.add function

$
0
0

I'm trying to add new artboard with the help of java script. I wasn't able to find solution nowhere. The scripting guidelines from adobe are just poor (to not use more strong words).

 

What ever I'm trying it returns the error

 

Error 1242: Illegal argument - argument 1 - Rectangle value expected

 

when I use value of `artboard.artboardRect` from other artboard then it creates artboard in the same place but I can't modify it (resize) which makes this option useless.

 

    artboards.add(artboards[0].artboardRect);//works

    artboards.add([0,0,200,50]);//Error 1200: an Illustrator error coccurred: 1346458189('PARAM')

    var rect = artboards[0].artboardRect;

    rect[0] = 0;

    rect[1] = 0;

    rect[2] = 200;

    rect[3] = 50;

    artboards.add(rect);//Error 1242: Illegal argument - argument 1 - Rectangle value expected

 

new Rectangle yields to "Rectangle doesnt have constructor"


Viewing all articles
Browse latest Browse all 12845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>