/* LinePoly.ls - Create Line Polygons (C)1998 Y.Akagawa Create : 19980315 */ main { var pointcnt; var connFlg; var items[2]; var pointid[2]; var c1; var i = 0; selmode(USER); pointcnt = pointcount(); if(pointcnt < 2) return; reqbegin("Create Line Polygons"); items[1] = "Yes"; items[2] = "No"; c1 = addcontrol(2, "Does connect start and end?", items); if(reqpost()) connFlg = getvalue(c1); else return; reqend(); editbegin(); //Create line polygon for(i=1; i 2) { pointid[1] = points[pointcnt]; //End Point pointid[2] = points[1]; //Start Point addpolygon( pointid ); } editend(); }