RULE simple_list_of_elements_constraint

(* SCHEMA step_merged_ap_schema; *)
-- IN AP232
RULE simple_list_of_elements_constraint FOR (applied_document_reference );
   LOCAL
      dri : SET OF document_reference_item;
      adr : SET OF applied_document_reference;
      result : BOOLEAN := TRUE;
   END_LOCAL;
      adr := applied_document_reference;
      REPEAT i := 1 TO SIZEOF(adr) BY 1;
         IF EXISTS(adr[i]\document_reference.role) THEN
            IF adr[i]\document_reference.role.name = 'list of elements' THEN
               dri := adr[i].items;
               IF SIZEOF(dri) < 1 THEN
                  result := FALSE;
               END_IF;
               REPEAT j := 1 TO SIZEOF(dri) BY 1;
                  IF NOT ('STEP_MERGED_AP_SCHEMA.PRODUCT_DEFINITION_FORMATION' IN TYPEOF(dri[j])) THEN
                     result := FALSE;
                  END_IF;
               END_REPEAT;
            END_IF;
         END_IF;
      END_REPEAT;
   WHERE
      wr1:
         result;
END_RULE;

[Top Level Definitions] [Exit]

Generated by STEP Tools® EXPRESS to HTML Converter
2024-09-06T14:00:33-04:00