option 1: take a car battery, hook a couple of wires to it. drop the wires in the tank. the fish will stop swimming for a while. i find it easier to measure a vibrating fish than a swimming one.
option 2: pour a bunch of gelatin into the tank. after it firms up, measure away.
option 3: hide behind the tank with a flashlight. jump out and yell boo while shining the light in their eyes. while they a frozen scared, snap out the tape.
ok, seriously.............dont try 1 or 2. 3 should be ok, but you have to make sure you put a vid of it on here or it wont work.
I keep a 10" Black Piranha, so I use a bizarre method.
I take a section of bubble wall with a suction cup attached, and fix the cup to the middle of a plastic ruler (resembles an upside-down T). I then gently get as close as I can with it and take measurement.