We did this in the water, because boatyards were shut down during the pandemic and the brass/aluminium battery Volvo designed had finally succumbed to the laws of physics. I dived in with butyl tape, zip-ties and two plastic blocks made from the back of a broom with the bristles ripped out and cut in half because only supermarkets and food shops were open! Our saildrive 120S-E leg has three intake holes on each side and one in the front. Butyl stuffed into the side holes, then plastic blocks on top to clamp down onto the butyl and press it into the holes with zip-ties around the leg. Finally a foam cork whittled down to size stuffed into the single hole at the front. Shivering job in March!
After a hot shower, I took the hose off inside and carefully opened the seacock. Almost no water ingress, only the tiniest seep, easily managable by bilge-pumps. I had a little diaphragm pump with cigarette lighter plug, so shoved the intake hose into the open seacock all the way down the leg and left it pumping out the seepwater into the sink. All good and not a drop leaked into the boat.
So I went to work, big spanner onto the threaded fitting that's screwed into the gearbox. Bit of torque and FUCK, off it snapped, flush with the gearbox. Well, bugger. I looked at the mess and decided the only way to remove it was to cut across the threads with a small sawblade from a jigsaw, by hand to avoid damaging the gearbox any more than necessary.
So I went sawing away, the brass was soft and dezincified (so really mostly copper) and I made good progress. Of course the metal filings all went down the hole into the leg and got sucked up by the little pump, which promptly stopped pumping. FUCK! The water was rising in the leg and so were my stress levels. Sure, the bilge pump was going to take care of it and I could always plug the hole in the gearbox with something, but still, not ideal and no way to get an emergency haulout for weeks or months if it all goes terribly wrong.
Ran around the boat, finding another pump, this time with a strainer on the intake (duh) and wiring it up to 12V somewhere. That sorted and the leg pumped out once again, the rest of the job was a matter of finishing the sawing, wrestling out the broken remainder of the brass fitting (now stuck on the souvenir wall), cleaning up the thread and screwing in a new (temporary) fitting with valve with blobs of Sikaflex to seal it. Hose attached, valve closed, no leak, job done, apart from diving in and removing the exterior blocks, which I only did a few months later in June when the water was considerably warmer and the pandemic going on summer break.
So can it be pulled off with the boat in the water? Yup, absolutely. But probably a lot less stressful when hauled out
We sailed to Greece and did a July "spring" haulout and replaced the temporary metal fittings with all Tru-Design plastic bits (not snapping them off this time). To connect their ball-valve to the gearbox, I bought Tru-Designs longest threaded plastic skin fitting and cut off the flange. One end screwed into the gearbox. With the handle removed from a ball-valve, there was enough space to screw this onto the plastic threads without colliding with anything. Now every seacock on the boat is Tru-Design and stupid metal corrosion is no longer a worry.