Creating architecture walls from autocad

So, you need to find out if a line in AutoCad is drawn left to right or right to left.
That’s why center line is better
Better still is to upload your script
If the forum doesn’t let you, use a link to some filesharing platform.
You can also have a look how others solved this