Article View: adobe.scripting.indesign
Article #15194[AI 10 VB] Replace/copy pathItem between documents
From: Marijn_Kampf
Date: Wed, 24 Dec 2003 00:30
Date: Wed, 24 Dec 2003 00:30
29 lines
1889 bytes
1889 bytes
I can't post in the general scripting section therefor I'm trying my luck here, my question is about Illustrator.
I'm trying to replace a pathItem in one document with a pageItem from another document. If I create a watch on the pageItem variable after its copied it shows it's updated but the image in Illustrator doesn't seem to be affected at all. Any idea on how I can replace or copy an pageItem from one document to another?
The code I'm using is below:
'' Find source pageItem
For Each pageItem In sourceDocument.PageItems
If pageItem.Name = sourcePathItemName Then
'' This works I can see all the properties after the copy
Set newPageItem = pageItem
End If
Next pageItem
'' Find target pageItem
For Each pageItem In targetDocument.PageItems
If pageItem.PageItemType = aiPathItem Then
If ((pageItem.PathItem.Area - tolerancePathItemArea) < replacePathItemArea) And ((pageItem.PathItem.Area + tolerancePathItemArea) > replacePathItemArea) Then
'' This seems to works I can see all the properties in a Watch after the copy, but the images in illustrator isn't affected
Set pageItem = newPageItem
End If
End If
Next
Does anyone knows whats going wrong?
Regards,
Marijn.
Technical Details
Message-ID:
<2ccf0fba.-1@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webxShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,355ee7ae1fb956e3,start X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-12-23 16:37:45 PST From: Marijn_Kampf@adobeforums.com Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.scripting.indesign Subject: [AI 10 VB] Replace/copy pathItem between documents Message-ID: <2ccf0fba.-1@webx.la2eafNXanI> Date: Tue, 23 Dec 2003 16:30:29 -0800 Lines: 37 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit