BIM Planet | Docs
github.onlinetelegram
Visual Programming Encyclopedia v0.1.0
Visual Programming Encyclopedia v0.1.0
  • 🖐️Welcome!
  • About this section
  • 🧩Dynamo Nodes
    • Base Nodes
      • List
    • Revit
      • Revit > Selection
    • Civil 3D
    • Node Packages
  • Misc
    • ❓FAQ
    • About
    • Glossary
    • Changelog
  • Links
    • dynamobim.org
    • bimpanet.org
Powered by GitBook
On this page
  • List > Generate
  • List.Combinations

Was this helpful?

  1. Dynamo Nodes
  2. Base Nodes

List

Nodes for working with lists. Lists are collections of objects (numbers, lines, Revit elements, other lists) that have a simple or complex structure.

PreviousBase NodesNextRevit

Last updated 5 years ago

Was this helpful?

List > Generate

List.Combinations

Description

The purpose of this node is to create unique combinations of elements. The node accepts a list of elements as an input. And also a number specifying the length of the sublist of each individual combination. For each element of the list, a combination with all other elements is created. If you set the replace port value to true, then combinations with the original element will be created too.

The different order of elements in one combination does not make it unique. In the example above we don't see two combinations["A", "B"] and ["B", "A"] at the output. This node produces only one of them. If you need the order of elements to be taken into consideration, use List.Permutations node.

Inputs and Outputs

List of elements for creating combinations from them

Data Type and Structure

Direction

Default Value

var[]..[]

In

Number of elements in one combination

Data Type and Structure

Direction

Default Value

int

In

Enabling/Disabling combinations with original element

Data Type and Structure

Direction

Default Value

bool

In

false

List of created combinations

Data Type and Structure

Direction

Default Value

var[]..[]

Out

Practical Cases

For each facade you have to choose 3 not-repeatable colors. You need to understand how many unique color combinations can be made from the proposed list. Which element the color is applied to is not important.

🧩
As the number of colors grows, the quantity of their unique combinations increases
2020 © BIM Planet