Problem with modDocExtension.RemoveModelColorizer()

The problem is I can't get it to work. I've even tried calling it like this:

modDocExt.InstallModelColorizer(colorizer);

modDocExt.RemoveModelColorizer(colorizer);

but the custom colorized model remains installed. What's the trick to making this method work? Any help would be appreciated.

SolidworksApi macros