Autodesk Creative Platform Core Version 1.19.0
A broad and deep collection of 2D and 3D capabilities.

ParameterJSON Overview

Derived Classes: AngleParameterJSON, BooleanParameterJSON, FileParameterJSON, FloatParameterJSON, IntegerParameterJSON, LengthParameterJSON, ListParameterJSON, SketchParameterJSON, StringParameterJSON

This describes the basic fields that are available for all parameters. Depending on the parameter type additional fields can also be specified as described in the notes below. The value of parameters can be obtained through IShapeGenerator.preview, IShapeGenerator.evaluate or IShapeGenerator.validate.

JSON Field Summary

  • property
      displayIcon | Optional
  • property
      displayName | Required
  • property
      id | Required
  • property
      invalid | Optional , Default: "" , Coming Soon!
  • property
      type | Required
  • property
      validate | Optional , Default: false , Coming Soon!
  • property
      visible | Optional , Default: true , Coming Soon!

JSON Field Details

String displayIcon | Optional

The URL of the user-visible icon to be displayed for the parameter. Accepts a fully qualified URL of an image. To set the URL of a local resource added to the Library, see Library.imageURL

2 Examples:

params = [{
        "id" : "Name",
        "type" : "string",
        "displayIcon" : "http://domain/image.png",
        "default" : ""
    }]
params = [{
        "id" : "Name",
        "type" : "string",
        "displayIcon" : Library.imageURL("image-16x16.png"),
        "default" : ""
    }]

String displayName | Required

The user-visible name of the parameter. If a displayIcon is provided, the displayName shows up as the tooltip on the displayIcon.

String id | Required

The unique identifier for the parameter.

String invalid | Optional , Default: "" , Coming Soon!

During validation using IShapeGenerator.validate, if a parameter is not valid then the function can set this property to an error description that will be displayed to the user to explain why the value is not valid.

String type | Required

Indicates the type of the parameter, upon which additional properties can be configured. The allowable values that are supported today are:

Boolean validate | Optional , Default: false , Coming Soon!

Indicates whether the parameter requires validation using IShapeGenerator.validate when modified. Custom validation allows more complex data types to be validated, as well as allowing validation to take the values of other parameters into consideration.

Boolean visible | Optional , Default: true , Coming Soon!

Allows the developer to control the visibility of the parameter. This member can also be changed during the IShapeGenerator.validate callback.