I'm trying to place an svg in illustrator using extendscript. Here's basically what I'm doing
var doc = app.documents.add();
var p = doc.placedItems.add();
p.file = new File(svgfilepath);
This fails with the error
File is in a format that cannot be placed
I am able to place the same file manually using File > Place. Am I missing some thing? Need help!