Skip to main content
Skip table of contents

Selection Input

Use the Selection Input component of the plugin to let users of your Apps (and models in the future) select objects in the online viewer by clicking on them. In Grasshopper, information about the selection state can be retrieved as input and used to drive the parametric definition.

Overview

The Selection Input component needs to be setup along with a glTF 2.0 Display component which contains one or several objects that have a set name attribute. Read more about how to properly setup objects for filtering here.

image-20241002-152559.png

The component contains a single output, which sends the name of the objects that were selected by users in the online viewer. When working locally, the selection context does not exist, but one can use the “Local test data” component option to simulate selection and test the contextual logic inside Grasshopper (see section below).

Download the Grasshopper definition of the example here.

Component options

Find the component options within the right-click context menu of the component.

  • Name filters: use this option to define one or several name filters specifying which displayed geometry should be selectable (clickable) in the viewer . Read more about name filters in this article.

  • Min. Objects Selected: the minimum number of objects users are required to select before validating their selection. Needs to be at least 1.

  • Max. Objects Selected: the minimum number of objects users can select before validating their selection. Needs to be bigger than the Min.

  • Hover: whether or not a mouse hovering effect should be displayed on selectable objects in the scene before they are selected.

  • Local test data: simulate the selection of one or several objects in the viewer by entering their name(s) in this field. This option is only meant for local testing and will be ignored after uploading the model to ShapeDiver.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.