Skip to main content
Skip table of contents

Import Text

Premium feature

File imports are only available to users with a paid ShapeDiver subscription

The Import Text component is a way to let online users upload a text file that can be used as input to the Grasshopper definition. The component outputs a Text object.

This component is one of several components of the ShapeDiver plugin that can be used to import files in online ShapeDiver models. Read more about the general principles of all ShapeDiver Import components.

Example

Download the Grasshopper definition of this example here.

The example below includes an Import Text component that lets online users upload their own txt files. The simple definition then converts the text to curves and pipes them before displaying them in the online viewer.

The URI input of the Import Text component is fed the static URL of a remotely stored, publicly accessible obj file (https://shapediverdownloads.s3.amazonaws.com/staticassets/tryit.txt). By default, the component outputs the text included in this file before users of the online model upload their own.

Supported file formats

Define which file formats are allowed as inputs using the right-click context menu of the component.

The component currently supports the following file extensions:

.json

.xml

.ifc

.csv

.txt

Let us know through the forum if you need to import more image formats.

Applications

For complex product data logic that your grasshopper definitions may need, this component is ideal to be used along with the JSON components. These JSON components will allow you to access the data stored in your text file to be applied as parameters, restrictions, calculations, etc. If you have a csv format, using common Grasshopper text components will give you access to the data.

JavaScript errors detected

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

If this problem persists, please contact our support.