unwrap.setMatID - Bug

I try to write a script which can render every ID separately in the UVW Edit window, but this general syntax is absolutely wrong:
$.modifiers[#unwrap_uvw].unwrap.setMatID 2

It shows me that "OK", but nothing is happened...
Shearched for hours on the internet, maybe there is an update() command or something, but cant find anything.

Could somebody tell me whats wrong?