• Global community
    • Language:
      • Deutsch
      • English
      • EspaƱol
      • FranƧais
      • PortuguĆŖs
  • ę—„ęœ¬čŖžć‚³ćƒŸćƒ„ćƒ‹ćƒ†ć‚£
    Dedicated community for Japanese speakers
  • ķ•œźµ­ ģ»¤ė®¤ė‹ˆķ‹°
    Dedicated community for Korean speakers
Exit
0

Exception has been thrown by the target of an invocation. an Illustrator error occurred: 1346458189

Community Beginner ,
Jun 07, 2022 Jun 07, 2022

Copy link to clipboard

Copied

Exception has been thrown by the target of an invocation. an Illustrator error occurred: 1346458189 ('PARM')

I seem to be getting this error sporadically while trying to set the placedItem.file value to the valid path of another AI file.

Technically I am using C# and COM for this, and I could change things over to purely JavaScript, but I'd like to understand more about what might be causing this error.

var photoEnum = (doc.PlacedItems as IEnumerable).GetEnumerator();
PlacedItem item;
while (photoEnum.MoveNext()) {
    item = (PlacedItem)photoEnum.Current;
    if (item.Name == illustratorPlaceholder && item.File != photoPath) {
        item.File = photoPath;
    }
}

I'm already checking that the "photoPath" exists, and "illustratorPlaceholder" is just the name of the placedItem I want to set the file for. Since I cannot regularly replicate this, it is difficult to debug.

 

TOPICS
Scripting , SDK

Views

78

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
community guidelines
no replies

Have something to add?

Join the conversation
Adobe