# How do you select an edge loop with BMesh?

Can someone please explain to me how I go about selecting edge loops in BMesh? I'm new to Blender scripting and am venturing into BMesh but I can not figure out how to actual select an edge loop. Let's say I'm starting with an edge. How then do I go about getting and selecting the edge loop that that edge is a part of? Please and thank you!

This is almost a duplicate of this question. Simply add the select statement at the end. I also branched the code sample to go in both directions of the first edge.

e = bm.edges[0]

e.select = True

# jump between BMLoops to the next BMLoop we need

# following edge in the edge loop
e_next = loop.edge
e_next.select = True

• Awesome, thanks! I saw that one but for some reason I couldn't ever get it to work let alone how it actually works. – Zach Eastin Jun 11 '18 at 1:10