Your browser (Internet Explorer 8 or lower) is out of date. It has known security flaws and may not display all features of this and other websites. Learn how to update your browser.



Model Scripting

Sometimes you will want to add interactivity to your model. For instance, maybe you would like to:

  • Dynamically show and hide different parts of the model in response to user actions
  • Reconfigure large parts of the model based on user inputs
  • Develop a custom analysis algorithm that explores the model
  • Develop a custom user interface for a model

Insight Maker supports a large API that let's you script and take control of a model. The language to use this API is JavaScript: a widely used language that is an integral component of most web applications. A list of all the commands and features in this API is available here.

The simplest way to add interactivity to your model is to add a Button primitive to the model. Each Button has an action which is JavaScript code that may call API commands. When the Button primitive is clicked by the user, its action is run.