How to create center line? (VBA)

Hi, it`s me again

Any ideas on how to create the center line of the object?
Tracing is a useful tool, but the center line is very sloppy.

As far as I know, Google had ideas on drawing lines between nodes, and then on them the center line. But are there maybe simpler options?