Skip to content

Variants

The current variant can be controlled with LUA. This can be used, for example, to calculate and to save the grid of each variant via a script. The variant object is accessible via cna.variant.

  • cna.variant.current returns the current variant number (starting from 1) or sets it. The variant can be set as an integer (starting with 1) or by its ID.
  • cna.variant.last_calculated returns the most recently calculated variant (starting from 1)
  • cna.variant.is_current_calculated() indicates whether the current variant has been calculated already
  • cna.variant: all() iterates over all variants, starting with variant 0. The iterator returns three values: the number of the variant (starting from 1), its ID and - if set - the name (otherwise a copy of the ID).