# *********************************************************************
#                      Schneideskizze mit var. Kopf
# *********************************************************************

name(i31,"spalte");
name(i32,"blatnr");
name(i33,"lauf");

   blatnr = 1;
   spalte = 0;

   setlayer("mat_lis_wco");
   gst_justify(2);          # rechtsbuendig
   gst_rotation(0.0);
   gst_height(17.5);
   gst_color(2);
   write("Einfgepunkt Schneideskizze (links unten) :");
   read(p1);

   insert("WCONMA","ARTIFEX",p1,50.0,50.0,0.0);
   # Block/Zelle wcomat in Bibliothek ARTIFEX

    # Auftrags- und Plannummer aus Auftragsverwaltung einlesen
    #---------------------------------------------------------

    p3=p1;
    p3.x = p3.x + 974.5;
    p3.y = p3.y + 1414.6;
    text(p3,blatnr);

    project(s1,"AUFKURZ");
    p3=p1;
    p3.x = p3.x + 109;
    p3.y = p3.y + 1266;
    gst_color(4);
    gst_justify(0);          # linksbuendig
    text(p3,s1);
    gst_color(2);

    project(s1,"ZEICHNUNG");
    p3.x = p3.x + 677;
    text(p3,s1);
    gst_justify(2);          # rechtsbuendig
    

   blatnr = 1;
   spalte = 0;
   lauf = 1;

   write(mbwanzbieg);

   p2  = p1;
   p2.x = p2.x + 158.0  ;
   p2.y = p2.y + 990.0;

   
   for i88 = 1 to mbwanzbieg do
     begin
      p3 = p2;
      mbwliste(i88,"POS","3",s1);
      text(p3,s1);
      p3.x = p3.x + 112;

      mbwliste(i88,"STUECK","7",s1);
      text(p3,s1);
      p3.x = p3.x + 148;

      mbwliste(i88,"MATTYP","7",s1);
      text(p3,s1);
      p3.x = p3.x + 148;

      mbwliste(i88,"LAENGE","7.2",s1);
      text(p3,s1);
      p3.x = p3.x + 148;

      mbwliste(i88,"BREITE","7.2",s1);
      text(p3,s1);
      p3.x = p3.x + 180;

      mbwliste(i88,"GEW","7.2",s1);
      text(p3,s1);

      p2.y = p2.y - 30;

      if( spalte = 25) then
          begin
           lauf = lauf + 1;
           spalte = 0 ;
           p2.y  = p1.y;
           p2.x = p2.x + 1200.0  ;
           insert("WCONMA","ARTIFEX",p2,50.0,50.0,0.0);

             p3=p2;
             blatnr = blatnr + 1;
             p3.x = p3.x + 974.5;
             p3.y = p3.y + 1414.6;
             text(p3,blatnr);

             project(s1,"AUFKURZ");
             p3=p2;
             p3.x = p3.x + 109;
             p3.y = p3.y + 1266;
             gst_color(4);
             gst_justify(0);          # linksbuendig
             text(p3,s1);
             gst_color(2);

             project(s1,"ZEICHNUNG");
             p3.x = p3.x + 677;
             text(p3,s1);
             gst_justify(2);          # rechtsbuendig
    
           p2.x = p2.x + 140.0  ;
           p2.y = p2.y + 990.0;
           spalte = 0;

           end;

       spalte = spalte + 1;
    
     end;

   p3 = p1;
   p3.x = p3.x + 894 + 1358 * (lauf - 1);
   p3.y = p3.y + 90.5;
   mbwliste(i88,"GESGEW","7.2",s1);
   text(p3,s1);

   write("Einfgepunkt Liste ganze Matten (links unten) :");
   read(p1);

   insert("WCOBMA","ARTIFEX",p1,50.0,50.0,0.0);
   # Block/Zelle wcomat in Bibliothek ARTIFEX

    blatnr = blatnr + 1;
    p3=p1;
    p3.x = p3.x + 974.5;
    p3.y = p3.y + 1414.6;
    text(p3,blatnr);

    project(s1,"AUFKURZ");
    p3=p1;
    p3.x = p3.x + 109;
    p3.y = p3.y + 1266;
    gst_color(4);
    gst_justify(0);          # linksbuendig
    text(p3,s1);
    gst_color(2);

    project(s1,"ZEICHNUNG");
    p3.x = p3.x + 677;
    text(p3,s1);
    gst_justify(2);          # rechtsbuendig
    
   p2  = p1;
   p2.x = p2.x + 158.0  ;
   p2.y = p2.y + 990.0;

   
   for i88 = 1 to mbwanzmatt do
     begin
      p3 = p2;
      mbwliste(i88,"GANZ","3",s1);
      text(p3,s1);
      p3.x = p3.x + 120;

      mbwliste(i88,"GTYP","7",s1);
      text(p3,s1);
      p3.x = p3.x + 140;

      mbwliste(i88,"GLAE","7.2",s1);
      text(p3,s1);
      p3.x = p3.x + 148;

      mbwliste(i88,"GBRE","7.2",s1);
      text(p3,s1);
      p3.x = p3.x + 153;

      mbwliste(i88,"GEGW","7.2",s1);
      text(p3,s1);
      p3.x = p3.x + 175;

      mbwliste(i88,"GGWP","7.2",s1);
      text(p3,s1);

      p2.y = p2.y - 30;

     end;

   p3 = p1;
   p3.x = p3.x + 894;
   p3.y = p3.y + 90.5;
   mbwliste(i88,"GGEW","7.2",s1);
   text(p3,s1);

END.
