Sketch.copy Method

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

Description

Copies the specified sketch entities, applying the specified transform. Any geometric or dimension constraints associated with the entities will automatically be copied, if possible. For example, if there is a horizontal dimension and the transform defines a rotation then it will not be included in the result. This same behavior can be seen when performing a copy/paste operation in the user interface.

Syntax

"sketch_var" is a variable referencing a Sketch object.
# Uses no optional arguments.
returnValue = sketch_var.copy(sketchEntities, transform)

# Uses optional arguments.
returnValue = sketch_var.copy(sketchEntities, transform, targetSketch)
"sketch_var" is a variable referencing a Sketch object.

#include <Fusion/Sketch/Sketch.h>

// Uses no optional arguments.
returnValue = sketch_var->copy(sketchEntities, transform);

// Uses optional arguments.
returnValue = sketch_var->copy(sketchEntities, transform, targetSketch);

Return Value

Type Description
ObjectCollection Returns a collection of the new sketch entities that were created as a result of the copy.

Parameters

Name Type Description
sketchEntities ObjectCollection The collection of sketch entities to copy. They must all exist in this sketch.
transform Matrix3D The transform to apply to the copied entities.
targetSketch Sketch Optionally specifies the sketch to copy the entities to. If not provided the entities are copied to this sketch.

This is an optional argument whose default value is null.

Version

Introduced in version August 2014