Skip to main content
Skip table of contents

Direct Data Output

In Grasshopper, when you want to output data from the model to be used in a web application, you can use the Direct Data Output component. This data can be accessed through our API and will help you out with algorithms you may need to create to get pricing lists, material lists or any other documentation.

This component supports the following data types: scalar, string, guid, point, vector, color, box, interval, line, ray, plane, transform, nurbs curve and surface and the viewer API will output the data as a Javascript object which preserves the tree structure. Importantly, the component also supports JSON outputs, created with the ShapeDiver plugin and some other third-party one which support the JSON format.

It is important to give this component a unique name, which will allow you to identify the corresponding output on the API.

Download an example model containing all the types of data outputs here.

Component Name for the API
The data output is most likely destined to be read using the Viewer API. It is important to give the Direct Data Output component a unique name, based on which it can be identified by the web developer. This is particularly crucial if the Grasshopper model contains several output components.

JavaScript errors detected

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

If this problem persists, please contact our support.