# UI.Listview Data

## 1. Description

This node allows you yo create a ListView input type on UI.MultipleInputForm++ forms.&#x20;

![](https://238629208-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LO8n4ithPJG3iCqU7ir%2F-LODRWXnP0R4oQB3FUDS%2F-LODSa1AhrKw6u_I6sjF%2Fimage.png?alt=media\&token=c008dc1b-444a-4f29-9bc7-0550ad88f71d)

## 2. Inputs

* **InputName (optional):**\
  This input lets you label the ListView on the form. All it takes is a string. If no input name is set, the ListView will appear wider.

![](https://238629208-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LO8n4ithPJG3iCqU7ir%2F-LODRWXnP0R4oQB3FUDS%2F-LODT0Y-T12_f3XeBXyJ%2Fimage.png?alt=media\&token=330a05f6-faae-41da-8700-0927dc1d2a2c)

* **Keys** and **Values**:\
  These are mandatory inputs, and they work together. The keys are the texts that are displayed to the user in the ListView input. This list must mach the list of "Values" so that when a user selects items in the ListView menu, the associated value will be returned. In the following example, the keys are Sheet Numbers, and the values are the Sheets.

![](https://238629208-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LO8n4ithPJG3iCqU7ir%2F-LODRWXnP0R4oQB3FUDS%2F-LODTgjQP5vOkyjQ0SPJ%2Fimage.png?alt=media\&token=78007b29-7b6f-45f2-bc7a-1bc2fb9e72ab)

If the elements in the "Values" list are detected as Revit elements, then the element Id will be appended to the key, allowing the user to differentiate two elements with the same name.&#x20;

* **Height (optional):**\
  This input lets you set the height of the ListView. It takes integer values. The default height of ListViews is 200.&#x20;

![](https://238629208-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LO8n4ithPJG3iCqU7ir%2F-LODRWXnP0R4oQB3FUDS%2F-LODUXGaIfU6vm78V8L_%2Fimage.png?alt=media\&token=483c770d-6330-48ae-a7cf-c21b00a9b2d0)

* **HilightInView (optional)**:\
  This input takes a boolean value. When set to _true_,  the ListView behaves like a Watch node. Clicking on the elements will zoom and center the view on it in Revit. Clicking multiple times on the same list item will browse through all the views that the element can be seen in in the projet. When the option is activated, the list view visual style will be different with blue and white lines. The default value of the input is _false_ and all of this obviously only works if the "Values" input list contains Revit elements.\
  In the following example, we have a list of all furnitures and we hilight elements in Revit by clicking on them in the LiftView.

![](https://238629208-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LO8n4ithPJG3iCqU7ir%2F-LODRWXnP0R4oQB3FUDS%2F-LODalrSnq17-KN8Szzt%2Fimage.png?alt=media\&token=0461effa-b8eb-4191-82d6-1dd2fc2e3364)

![](https://238629208-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LO8n4ithPJG3iCqU7ir%2F-LODRWXnP0R4oQB3FUDS%2F-LODaqAynMfRbnFA-Uam%2FHilightinview.gif?alt=media\&token=7c0475d1-ec63-4ae4-8cfd-28c7f2c27cb6)

* **DisplayModeOnly (optional):**\
  When you only want to display a list of informations to the user, you can activate this option by setting the DesplayModeOnly to _true_. There won't be check boxes to select items from the list anymore and nothing will be returned by UI.MultipleInputForm++.&#x20;

![](https://238629208-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LO8n4ithPJG3iCqU7ir%2F-LODRWXnP0R4oQB3FUDS%2F-LODblT0-AJhaM4uJC2s%2Fimage.png?alt=media\&token=3e9fe27d-769c-4ac2-81aa-7cab5573dea3)

* **DefaultValueIndices (optional):**\
  This input lets you set the elements that will be checked by default on the ListView menu when it is first shown to the user. It takes a list of integer values that represents the indices of the elements in the lists of Keys/Values.&#x20;

![](https://238629208-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LO8n4ithPJG3iCqU7ir%2F-LODRWXnP0R4oQB3FUDS%2F-LODcy5BnGH2zdfmb9Rn%2Fimage.png?alt=media\&token=d5a46308-8e02-45f2-859c-eb7c499fa2b1)

* **SortItems (optional):**\
  This input is used to determine whether you want your lists of keys/values to be sorted (alphanumerically) or not. It takes a boolean value and is set to _true_ by default. If you set it to false, then the items will appear in the ListView menu in the same order as in the Keys/Values lists.&#x20;

![](https://238629208-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LO8n4ithPJG3iCqU7ir%2F-LODRWXnP0R4oQB3FUDS%2F-LODdW34DKI4cuUpgEM8%2Fimage.png?alt=media\&token=56c12559-ac1a-4cd7-8d23-df8975695309)

* **ShowId (optional):**\
  As explained earlier, if the elements in the "Values" list are detected as Revit elements, the element Ids will automatically be appended to the key, in order to differentiate elements with the same key. If you don't want the Ids showing, you can set the "ShowId" input to _false_. It's default value is _true_. Be careful using this as having two elements with the same key will cause the user input to fail most of the times.&#x20;

![](https://238629208-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LO8n4ithPJG3iCqU7ir%2F-LODRWXnP0R4oQB3FUDS%2F-LODekYfyqqT7wKIMjHM%2Fimage.png?alt=media\&token=38e2678c-b7e2-49e5-9439-cecc10c1c62b)

![](https://238629208-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LO8n4ithPJG3iCqU7ir%2F-LODRWXnP0R4oQB3FUDS%2F-LODetOKK1Sw30YHepJg%2Fimage.png?alt=media\&token=3fb9abf5-b6a3-4de9-9333-4f0e7a3b36bf)

## 3. Output

The selected ListView items will be returned by UI.MultipleInputForm++ as a nested list . The object types will be the same as the elements in the "Values" list.

![](https://238629208-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LO8n4ithPJG3iCqU7ir%2F-LODRWXnP0R4oQB3FUDS%2F-LODfwAHmGK6Thv7YfGG%2Fimage.png?alt=media\&token=8ab61173-e17c-4576-aa0c-d87d80a5d49d)
