error 55 object does not support the property or method 'paths'

New Here ,
Oct 09, 2020

Copy link to clipboard

Copied

hi!

I want to insert an image into a rectangle made of JavaScript fan tools.

 

var i = 0;
for (var p = 1; p <= myPages.length - 1; p++) {
for (var n = 1; n <= 1; n++) {
  if (i <= myOutGroupPics1.length - 1) {
     myPages[p].pahts -> What should I change this place to?
    .item("myOutGroup" + n)
    .place(File(myOutGroupFolder1 + "/" + myOutGroupPics1[i].name));
    i++;
   }
 }
}

Adobe Community Professional
Correct answer by Manan Joshi | Adobe Community Professional

Hi @text_driver 

It seems this thread is also related to the one we discussed here, if it is then I suppose you have your answer, and if you say I can merge this thread with the other one.

-Manan

TOPICS
Scripting

Views

62

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

error 55 object does not support the property or method 'paths'

New Here ,
Oct 09, 2020

Copy link to clipboard

Copied

hi!

I want to insert an image into a rectangle made of JavaScript fan tools.

 

var i = 0;
for (var p = 1; p <= myPages.length - 1; p++) {
for (var n = 1; n <= 1; n++) {
  if (i <= myOutGroupPics1.length - 1) {
     myPages[p].pahts -> What should I change this place to?
    .item("myOutGroup" + n)
    .place(File(myOutGroupFolder1 + "/" + myOutGroupPics1[i].name));
    i++;
   }
 }
}

Adobe Community Professional
Correct answer by Manan Joshi | Adobe Community Professional

Hi @text_driver 

It seems this thread is also related to the one we discussed here, if it is then I suppose you have your answer, and if you say I can merge this thread with the other one.

-Manan

TOPICS
Scripting

Views

63

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Oct 09, 2020 0
Adobe Community Professional ,
Oct 09, 2020

Copy link to clipboard

Copied

I am unsure what you are storing in myOutGroupPics1.

Just to place an Image file into an already made rectangle you can do this like this:

var myImagFile = File("~/Desktop/Untitled.png");
var myRectangle = app.documents[0].pages[0].rectangles[0];
myRectangle.place(myImagFile);
myRectangle.fit(FitOptions.CONTENT_TO_FRAME);

Best

Sunil

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 09, 2020 0
Adobe Community Professional ,
Oct 12, 2020

Copy link to clipboard

Copied

Hi @text_driver 

It seems this thread is also related to the one we discussed here, if it is then I suppose you have your answer, and if you say I can merge this thread with the other one.

-Manan

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 12, 2020 0