Since you can’t change connections at runtime, you could connect your monitor to a “forwarder” which would be a subscriber with an analysis port whose write() method would conditionally call ap.write() based on a control variable. Then you would connect forwarder.ap to your scoreboard.