What macro divide30 group points lineThruPoints?

Hi,
V5
when doing a section through a flat surface mesh, I get a wriggly line.
I want to make a button that will:-
divide30 the wriggly line,
group the points,
place best fit line through those points.

what would it be please?

then I can make a button for V5.

Cheers

Steve

line or curve ?

you have a sample file ?

the macro will be some like this:

_divide _pause 30 enter _selnone _sellast _lineThroughPt _selnone

Hi, Line.
section nut mesh attached.
I have divide30 one linee then grouped the points then LineThroughPt tool
section nut mesh.3dm (154.9 KB)

and could it group the points made please.
apart from grouping which I forgot to mention, it works.

_divide _pause 30 enter _group _selnone _sellast _lineThroughPt _selnone

would it be this for grouping the made points ?
not quite, it asks me to select the objects to group.

Steve

Hi,
anyone or Tom, need this solving. PLEEEEEEZE.
what code for group the points before placing LineThroughPt

Steve