I did the same when I needed urine from my Peppi(
)I waited for him to go to the box,then I held a container to catch the pee,but he was a very calm cat.
Rocky stayed one day at the vet and they had to extract urine,not a pleasant experience for him,I am sure.
I am sooo pleased with Fords progress