|
When I manually create graphics I can use layers to separate them.
Trying to do the same on a script created doc.
Make a new doc with layers
property symcalLayers : {"timeLine", "grid", "annotations"}
tell application "Create"
make new document at before front document
repeat with layername in symcalLayers
tell last page of front document to make new pagelayer at end with properties {layername:layername}
end repeat
end tell
This makes my doc with layers but cannot figure how to get grahics in each layer. This will get graphics in page but each graphic is in all three layers.
tell application "Create"
set cnt to 1
repeat with layername in symcalLayers
tell last page of front document
make new text area at end with properties {x position:200, y position:(100 + (cnt * 80) + 20), width:129, height:17, text contents:(layername & " layer")}
end tell
set cnt to cnt + 1
end repeat
end tell
But I can't 'tell pagelayer 2 of last page of front document' because pagelayers don't have graphics. Seems I need to set some context that causes drawing to be done in the 'selected' pagelayer?
Suggestons appreciated.
Terry
|