---
title: CAFTA Script Archive
---

[![RMI Logo](https://www.werermi.com/hs-fs/hubfs/RMI%20Logo.jpg?width=566&height=48&name=RMI%20Logo.jpg "RMI Logo")](https://werermi.com/?hsLang=en)

## CAFTA Scripts

 Finding Maximum Cutset Order

Cutset *Order* is the number of basic events in a cutset.  In a long list of cutsets, how do you find the cutset that has the maximum number of basic events?

| ![Cutsets](https://www.werermi.com/hs-fs/hubfs/Cutsets.jpg?width=637&height=505&name=Cutsets.jpg)   | One way is a [manual two-step process in CAFTA](https://www.youtube.com/watch?v=nTAWWHTT3ok&utm_source=hs_email&utm_medium=email&_hsenc=p2ANqtz-8K5JA0mBy37Vrhw1NajqeMY9QeRRYGZpUcevs1YwTIA60qs4bpRnRn8rIs1HS5M9Sc5rJX): 1. Sort the cutsets on Order 2. Scroll to the last cutset and count the inputs  |
| --- | --- |

| The CAFTA script looks like this.  Copy this text, paste it into CAFTA's script editor, and run it: 'Determine maximum MCS order. CS.Sort(CutsetModule.enumSortMethod.ByOrder) messagebox.show("Max. cutset order = " & \_    CS.CutsetRows(CS.CutsetRows.count-1).inputs.count)   This video link shows how to run the script in CAFTA.   |
| --- |

## Footer

[LinkedIn](https://www.linkedin.com/groups/14123082/) [YouTube](https://www.youtube.com/@Risk_Management_Innovations)

© 2026 Risk Management Innovations. All rights reserved.