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

SketchParameterJSON Overview

Inherits Classes: ParameterJSON

A 2D sketch. Developers are encouraged to add SVG resources to their project and load them asynchronously to populate the defaults. The actual value is a Sketch2D object obtained from Conversions.toSketch2DFromSVG.

1 Example:

function shapeGeneratorDefaults(callback) {
  Library.resourceText('Circle.svg', function(resourceData) {
    var sketch2D = Conversions.toSketch2DFromSVG(resourceData);
    var params = [
      {
        "id": "sketch",
        "displayName": "Profile",
        "type": "sketch",
        "default": sketch2D
      }
    ];
    callback(params);
  });
}

JSON Field Summary

  • property
      default | Required
  • 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

Sketch2D default | Required

It is a Sketch2D object constructed from the SVG resource file.