Friday, April 2, 2010

Copying an opacity mask

I have a script that cuts a group of objects and pastes it multiple times on a page and then updates text within each group from a db.?It works great until an opacity mask is contained in the group.?The masking object isn't copied and remains in it's original position and therefore the new copies of the group are incorrect.

Code used to do the cut is:

myApp.Documents(1).GroupItems(''MyTemplate'').Cut

and to paste:

myApp.Documents(1).Paste

Any suggestions?

Thanks

Copying an opacity mask

Good evening,

I'm not sure that you select correctly the mask when you use groupItems.

I think that the mask is not a item of the groupItems.

Please try the kind of selection.

Sub graf()
Set myai = CreateObject(''illustrator.application.CS4'')
Set myDocAi = myai.ActiveDocument
Set myLayer = myDocAi.Layers(''graphlayer'')
myLayer.HasSelectedArtwork = True
myai.Cut
myai.Paste
myai.Paste
myai.Paste
myai.Paste
End Sub

Patrice

No comments:

Post a Comment