.
"A Westjet Encore de Havilland Dash 8-400, registration C-FKWE performing flight WS-3405 from Vancouver,BC to Victoria,BC (Canada), was climbing out of Vancouver's runway 08R following the Stanley 5 Standard Instrument Departure and climbing to 2000 feet and was about to level at 2000 feet, when the crew received clearance to climb to 4000 feet and turn onto heading 170."
On this route, for the Q400, this is a typical clearance, and is a little tricky to manage. Just from memory, the Stanley 5 calls for a right turn at 1000' to about a 140 heading and level out at 2000". Then at some point ATC clears you for another right turn to 170 and climb to 4000'. This all happens very quickly and you have to be ready for it, and brief ahead of time. Usually we will brief the approach on the ground as well.
IMHO this is a good way to manage it:
After T/O do the regular gear up etc... Usually the FD is in pitch, nav and alt sel. At 1000' the PF starts turning right, engages the AP, calls flap 0, climb power, after T/O check, which the PM does and contacts departure and gets clearance to 4000' and another right turn. By the time the PM reads back the clearance to 4000', the aircraft is capturing 2000' and starting to nose down to level off at 2000'. By this point, the PF should have his hand near the altitude select knob, and if timed right turns the knob to 4000' right when the pitch is between 5 and 10 degrees, then selects hdg, and turns the heading knob to 170. The FD automatically goes to pitch and alt sel mode (confirm of course) and levels off at 4000'. Do not touch the pitch wheel. If you touch the pitch wheel, alt sel will cancel, and you will blow past your clearance altitude. Generally I like having the AP on for this, because it happens so fast and the PM can be easily get overloaded doing everything plus monitoring the PF closer than usual, if you know what I mean.
Of course you need to listen carefully to the departure clearance, because sometimes it is different.
.