• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers

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

35

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

Have something to add?

Join the conversation