I have a surface body that resembles a tube with straight sections and arc sections. I'm looking for a macro that will create an axis on every straight section and planes referencing those axes and also being perpendicular to the Top Plane of the part file. Either where it automatically selects every straight if possible, or if the user selects the straights as it goes. If the user selects the straights, it would be ideal if the macro would continue running until the user has selected all of the straights.

I have a surface body that resembles a tube with straight sections and arc sections. I'm looking for a macro that will create an axis on every straight section and planes referencing those axes and also being perpendicular to the Top Plane of the part file. Either where it automatically selects every straight if possible, or if the user selects the straights as it goes. If the user selects the straights, it would be ideal if the macro would continue running until the user has selected all of the straights.