Hi,
I'd like to know how to read the size of the active artboard and then create a rectangle on the bounds of that board.
Thanks in advance for your time and effort,
Rene
Okay,
Found something in the forum that helped me out and this does the trick:
var myArtboard=document.activeArtboard;
var mabsize = myArtboard.bounds
var rect=new Path.Rectangle(new Point(0,0),new Point(mabsize));
I know what I want, but it is the syntax of the java that I still need to lean.
Thnx!
Artboards are a unique and powerful feature of Illustrator. The artboard works just like a piece of paper would on a physical desk. For example, if you were creating a collage, you could put elements you are not currently using on your desk outside of the bounds of the paper. They are still close for easy access, but they don’t interfere with the artwork taking shape on the document. Illustrator works in a similar way.
When you create a new document, you have an artboard in the middle of a large workspace. Any graphics you place on the artboard itself will appear in the final design. Anything outside its bounds will not appear when you print, export, or save as a PDF. It’s a great way to keep all of your assets in one file rather than scattered across separate files on your hard disk, or in hidden layers that become hard to manage. What’s even better is that you can have multiple artboards in one Illustrator document. You’ll find this feature very powerful when you’re creating user interfaces or building website designs, because it lets you keep an entire site in one file.
Tanvir Hossain
Here you go.
var workingDoc = app.activeDocument;
workingDoc.selection = null;
workingDoc.defaultFillColor = workingDoc.swatches["[None]"].color;
workingDoc.defaultStrokeColor = workingDoc.swatches["[None]"].color;
var artBoardRectangle = workingDoc.pathItems.rectangle(workingDoc.height, 0, workingDoc.width, workingDoc.height, false);
Bob