RULE ply_stock_material_select

(* SCHEMA step_merged_ap_schema; *)
-- DIFF IN AP203e2
-- IN AP203e2/AP242
RULE ply_stock_material_select FOR (product_related_product_category, make_from_usage_option );
   LOCAL
      i : INTEGER;
      j : INTEGER;
      k : INTEGER;
      kp : INTEGER;
      dkuhr : LOGICAL;
      nmfuo : INTEGER;
      nprpc : INTEGER := 0;
      rp : product;
   END_LOCAL;
      dkuhr := TRUE;
      REPEAT kp := LOINDEX(product_related_product_category) TO HIINDEX(product_related_product_category) BY 1;
         IF product_related_product_category[kp].name = 'ply' THEN
            REPEAT i := LOINDEX(product_related_product_category[kp].products) TO HIINDEX(product_related_product_category[kp].products) BY 1;
               nmfuo := 0;
               REPEAT j := LOINDEX(make_from_usage_option) TO HIINDEX(make_from_usage_option) BY 1;
                  rp := make_from_usage_option[j].related_product_definition.formation.of_product;
                  IF product_related_product_category[kp].products[i] = rp THEN
                     REPEAT k := LOINDEX(product_related_product_category) TO HIINDEX(product_related_product_category) BY 1;
                        IF (rp IN product_related_product_category[k].products) AND (product_related_product_category[k].name IN [ 'isotropic material', 'filament assembly', 'discontinuous fiber assembly' ]) THEN
                           nprpc := nprpc + 1;
                        END_IF;
                     END_REPEAT;
                     IF nprpc = 1 THEN
                        nmfuo := nmfuo + 1;
                     ELSE
                        dkuhr := FALSE;
                        ESCAPE;
                     END_IF;
                  END_IF;
               END_REPEAT;
               IF dkuhr = FALSE THEN
                  ESCAPE;
               END_IF;
               IF nmfuo <> 1 THEN
                  dkuhr := FALSE;
                  ESCAPE;
               END_IF;
            END_REPEAT;
         END_IF;
      END_REPEAT;
   WHERE
      wr1:
         dkuhr;
END_RULE;

[Top Level Definitions] [Exit]

Generated by STEP Tools® EXPRESS to HTML Converter
2017-01-19T11:17:24-05:00