Open Design

Get artboard contents

After you import a design, you may want to get the content of one or more artboards. Open Design returns the content as JSON, which you can traverse and get data about all layers, bounds, etc. See the Octopus doc for more details.

Get content of a specific artboard

To get the content of a specific artboard, call the artboard.getContent() method on the artboard.

This example finds the artboard using a query and then gets the content:

This returns a JSON object that looks like this:

Get content of all artboards

To get the content of all artboards:

  1. List all artboards using the design.getArtboards() method.
  2. Call the artboard.getContent() method on each artboard.

Here's an example: