CorelDraw (wine) has a pretty basic hpgl export filter. It does not do optomizing for pen colors. Via script/sed I have auto-edited the output for my machine thats works perfect except I need the pens grouped so I figure something to cut and paste using variables $SP7 (pen #7) and $LT (a known point to end cut). The file will ALWAYS will only be SP3 and SP7 (pen 3 and pen 7).
Then paste the SP7 snips to the end of the file so all pen 3 command are in a consecutive order then follwed by pen 7. Below is a sample of corel output. This is a very small and simple file, the working files are much bigger. Maybe 25 times bigger.
IN;
VS32,1;
VS32,2;
VS32,3;
VS32,4;
VS32,5;
VS32,6;
VS32,7;
VS32,8;
WU0;
PW0.349,1;
PW0.349,2;
PW0.349,3;
PW0.349,4;
PW0.349,5;
PW0.349,6;
PW0.349,7;
PW0.349,8;
SP7; I need file snipped here at Sp7 (including "SP7
LT;
PU20932 6924;
PD21275 6936;
PD21592 6972;
PD21882 7030;
PD22133 7104;
PD22341 7198;
PD22425 7249;
PD22496 7302;
PD22555 7358;
PD22595 7419;
PD22623 7480;
PD22631 7543;
PD22623 7607;
PD22595 7668;
PD22555 7726;
PD22496 7785;
PD22425 7838;
PD22341 7889;
PD22133 7980;
PD21882 8056;
PD21592 8112;
PD21275 8150;
PD20932 8163;
PD20591 8150;
PD20271 8112;
PD19984 8056;
PD19733 7980;
PD19524 7889;
PD19438 7838;
PD19367 7785;
PD19311 7726;
PD19268 7668;
PD19243 7607;
PD19235 7543;
PD19243 7480;
PD19268 7419;
PD19311 7358;
PD19367 7302;
PD19438 7249;
PD19524 7198;
PD19733 7104;
PD19984 7030;
PD20271 6972;
PD20591 6936;
PD20932 6924; Snip stops here using SP3 as the noninclusive end point
SP3;
LT;
PU12120 5803;
PD14719 5803;
PD14719 9801;
PD12120 9801;
PD12120 5803;
LT;
PU7726 13035;
PD9525 13035;
PD9525 15755;
PD7726 15755;
PD7726 13035;
SP7; Another snip starts here
LT;
PU8183 6164;
PD8280 6174;
PD8374 6205;
PD8463 6256;
PD8549 6324;
PD8630 6410;
PD8709 6512;
PD8780 6629;
PD8849 6761;
PD8910 6906;
PD8963 7063;
PD9011 7231;
PD9050 7409;
PD9083 7597;
PD9105 7792;
PD9118 7995;
PD9123 8201;
PD9118 8409;
PD9105 8613;
PD9083 8808;
PD9050 8994;
PD9011 9171;
PD8963 9342;
PD8910 9497;
PD8849 9641;
PD8780 9773;
PD8709 9893;
PD8630 9994;
PD8549 10078;
PD8463 10147;
PD8374 10198;
PD8280 10228;
PD8183 10238;
PD8089 10228;
PD7995 10198;
PD7907 10147;
PD7820 10078;
PD7736 9994;
PD7660 9893;
PD7586 9773;
PD7520 9641;
PD7459 9497;
PD7406 9342;
PD7358 9171;
PD7320 8994;
PD7287 8808;
PD7264 8613;
PD7251 8409;
PD7246 8201;
PD7251 7995;
PD7264 7792;
PD7287 7597;
PD7320 7409;
PD7358 7231;
PD7406 7063;
PD7459 6906;
PD7520 6761;
PD7586 6629;
PD7660 6512;
PD7736 6410;
PD7820 6324;
PD7907 6256;
PD7995 6205;
PD8089 6174;
PD8183 6164;
LT;
PU3848 11798;
PD6606 11798;
PD6606 15194;
PD3848 15194;
PD3848 11798; ends here
SP0;
Then all the SP& snips get put here at end of file, the order isn't import where which snip goes first
just as long as all the SP7 segments are at the end.
I sure hope someone can help me I've been three days on this task with sed/ed it's so darn hard when scripts are new to you!!
Thanks
Gary