newobject() with externals?

mattomatto's icon

Hi there,

I'm trying to dynamically create objects in Max. It works great with a toggle for example:
this.patcher.newobject("toggle",100,100,10,0);

But I get an error with:

this.patcher.newobject("ambiencode~",100,100,10,0);

Is it possible? There seems to be a bug with the ambiencode object where I have to add a new one every time I open withe patch to get it to work, so I'm trying to do it automatically.

Many thanks, Matt