Sketches.add Method

Parent Object: Sketches
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketches.h>

Description

Creates a new sketch on the specified planar entity.

Syntax

"sketches_var" is a variable referencing a Sketches object.

# Uses no optional arguments.
returnValue = sketches_var.add(planarEntity)

# Uses optional arguments.
returnValue = sketches_var.add(planarEntity, occurrenceForCreation)
"sketches_var" is a variable referencing a Sketches object.

#include <Fusion/Sketch/Sketches.h>

// Uses no optional arguments.
returnValue = sketches_var->add(planarEntity);

// Uses optional arguments.
returnValue = sketches_var->add(planarEntity, occurrenceForCreation);
"sketches_var" is a variable referencing a Sketches object.

// Uses no optional arguments.
returnValue = sketches_var.add(planarEntity);

// Uses Optional arguments.
returnValue = sketches_var.add(planarEntity, occurrenceForCreation);

Return Value

Type Description
Sketch Returns the newly created Sketch or null if the creation failed.

Parameters

Name Type Description
planarEntity Base A construction plane or planar face that defines the sketch plane
occurrenceForCreation Occurrence A creation occurrence is needed if the planarEntity is in another component AND the sketch is not in the root component. The occurrenceForCreation is analogous to the active occurrence in the UI.

This is an optional argument whose default value is null.

Samples

Name Description
API Sample that demonstrates creating sketch lines in various ways.

Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.

Before running: No open document is required; the script creates a new design (or additional documents) as it runs.

Loft Feature API Sample

Demonstrates creating a new loft feature.

Before running: No open document is required; the script creates a new design (or additional documents) as it runs.

Patch Feature API Sample

Demonstrates creating a new patch feature.

Before running: No open document is required; the script creates a new design (or additional documents) as it runs.

Simple Extrusion Sample

Demonstrates creates a new extrusion feature, resulting in a new component.

Before running: No open document is required; the script creates a new design (or additional documents) as it runs.

Simple Revolve Feature Sample

Demonstrates creates a new revolve feature, resulting in a new component.

Before running: No open document is required; the script creates a new design (or additional documents) as it runs.

Version

Introduced in version August 2014