You are right, different 26" rims may require different spoke lengths.
To measure the numbers you need to input to a spoke length calculator, here is what to do.
1) Spoke Hole Diameter. Put two spokes in spoke holes on opposite sides of the hub. Hold the hub so the spokes hang vertically over a ruler and measure the distance between the tips of the spokes. For the BMC this is 160mm. For most ebike motors this is the same on both sides.
2) Flange to center distances. This is pretty easy too. Every hub motor I have seen is dishless. So measure the distance between the spoke flanges and divide by 2. The flange to center is the same on both sides for a dishless wheel. For the BMC this is 22mm.
3) For the rim, you will need to know its ERD, or Effective Rim Diameter. 26" rims do not all have the same ERD. ERD measures the distance between where the nipples seat on the rim, not where the tire bead sits on the rim. For most rims, you can find the manufacturer's published ERD somewhere on the web. If you are stuck without the ERD, you can measure it yourself. To see it explained in great detail, see http://www.sheldonbrown.com/rinard/spocalc.htm By the way, the late great Sheldon Brown was a bike guru beyond all others. Most technical bike questions are already answered on his website.
I like spocalc. Unlike most calculators you can add a custom hub, like a hub motor, and keep it as part of your spreadsheet for the next time you use it. Every time I build with a new hub or rim I add it to my list. But be careful note the number of crosses since they are all listed together. I am so used to doing 3X lacing that I have forgotten to look a 1x and radial results.