Hi Matthew,
The simple fix is to simply change Find Seg into Find Segs. This will find all the line segments (there are two, one for each sex) and replace the width to what you need.
Furthermore, because there’s only 1 frame box (or 1 graph), we do not need the For loop here. I found the community post you were referring to, and in that example, there are two frame boxes.
So we can simplify your code as follows:
Names Default To Here(1);
Open("$SAMPLE_DATA/Big Class.jmp");
gb = Graph Builder(
Size( 534, 454 ),
Show Control Panel( 0 ),
Variables( X( :height ), Y( :weight ), Overlay( :sex ) ),
Elements( Points( X, Y, Legend( 3 ) ), Line( X, Y, Legend( 5 ) ) )
);
fbs = gb << XPath("//FrameBox");
seg = (fbs << Find Segs("Line Seg"));
seg << Set Line Width(1);
Hope this helps!