gw drawing in a non active viewport

I have a function that draws stuff in the active viewport, and when I switch the viewport the drawings move to it as well. I want them to stay in the viewport they have been created in. Is it possible?
Cheers