General

General

How do I use a IF statement in a journal?

    • FAQFAQ
      Participant

      You can use:
      (if (insert condition) (begin (insert operations) ) (begin (insert else operations) ) )
      Below is an example which checks and stores a list of failed* face zones in Fluent Meshing. If this list is empty then the journal is paused. On pressing a key on the keyboard – the journal continues to run the journal and checks the mesh quality.
      (define failed-zones (get-face-zones-of-filter ‘failed*)) (if (null? failed-zones) (begin (display “No failed zones”) ) (begin (display “Failed zones detected”) (cx-pause) ) ) /report/quality/orthoskew /report/cell-quality-limits fluid ()