NetLogo 7.0.0-beta2:

nw:with-context

nw:with-context turtleset linkset command-block

Executes the command-block with the context temporarily set to turtleset and linkset. After command-block finishes running, the previous context will be restored.

For example:

If you have NW extension code running in two forever buttons or loop blocks that each need to use different contexts, you should use nw:with-context in each to make sure they are operating in the correct context.

Take me to the full Networks Extension Dictionary