Skip to main content
Participating Frequently
June 7, 2022
Question

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

  • June 7, 2022
  • 0 replies
  • 120 views

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.

 

This topic has been closed for replies.